class Jabber::Discovery::Item

Service Discovery item to add() to IqQueryDiscoItems

Please note that JEP 0030 requires the jid to occur

Public Class Methods

new(jid=nil, iname=nil, node=nil) click to toggle source

Initialize a new Service Discovery <item/> to be added to IqQueryDiscoItems

jid
JID
iname
String

Item name

node
String

Service Discovery node (not Jabber::JID#node)

Calls superclass method
# File lib/xmpp4r/discovery/iq/discoitems.rb, line 70
def initialize(jid=nil, iname=nil, node=nil)
  super()
  set_jid(jid)
  set_iname(iname)
  set_node(node)
end

Public Instance Methods

iname() click to toggle source

Get the item's name or nil

This has been renamed from <name/> to “iname” here to keep REXML::Element#name accessible

result
String
# File lib/xmpp4r/discovery/iq/discoitems.rb, line 105
def iname
  attributes['name']
end
iname=(val) click to toggle source

Set the item's name

val
String
# File lib/xmpp4r/discovery/iq/discoitems.rb, line 112
def iname=(val)
  attributes['name'] = val
end
jid() click to toggle source

Get the item's jid or nil

result
String
# File lib/xmpp4r/discovery/iq/discoitems.rb, line 80
def jid
  JID.new(attributes['jid'])
end
jid=(val) click to toggle source

Set the item's jid

val
JID
# File lib/xmpp4r/discovery/iq/discoitems.rb, line 87
def jid=(val)
  attributes['jid'] = val.to_s
end
node() click to toggle source

Get the item's Service Discovery node or nil

result
String
# File lib/xmpp4r/discovery/iq/discoitems.rb, line 127
def node
  attributes['node']
end
node=(val) click to toggle source

Set the item's Service Discovery node

val
String
# File lib/xmpp4r/discovery/iq/discoitems.rb, line 134
def node=(val)
  attributes['node'] = val
end
set_iname(val) click to toggle source

Set the item's name (chaining-friendly)

val
String
# File lib/xmpp4r/discovery/iq/discoitems.rb, line 119
def set_iname(val)
  self.iname = val
  self
end
set_jid(val) click to toggle source

Set the item's jid (chaining-friendly)

val
JID
# File lib/xmpp4r/discovery/iq/discoitems.rb, line 94
def set_jid(val)
  self.jid = val
  self
end
set_node(val) click to toggle source

Set the item's Service Discovery node (chaining-friendly)

val
String
# File lib/xmpp4r/discovery/iq/discoitems.rb, line 141
def set_node(val)
  self.node = val
  self
end