| Class | Jabber::DiscoItem |
| In: |
lib/xmpp4r/iq/query/discoitems.rb
|
| Parent: | REXML::Element |
Service Discovery item to add() to IqQueryDiscoItems
Please note that JEP 0030 requires the jid to occur
Initialize a new Service Discovery <item/> to be added to IqQueryDiscoItems
| jid: | [JID] |
| iname: | [String] Item name |
| node: | [String] Service Discovery node (not JID#node) |
# File lib/xmpp4r/iq/query/discoitems.rb, line 83
83: def initialize(jid=nil, iname=nil, node=nil)
84: super('item')
85: set_jid(jid)
86: set_iname(iname)
87: set_node(node)
88: end
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/iq/query/discoitems.rb, line 118
118: def iname
119: attributes['name']
120: end
Set the item’s name
| val: | [String] |
# File lib/xmpp4r/iq/query/discoitems.rb, line 125
125: def iname=(val)
126: attributes['name'] = val
127: end
Get the item’s jid or nil
| result: | [String] |
# File lib/xmpp4r/iq/query/discoitems.rb, line 93
93: def jid
94: JID::new(attributes['jid'])
95: end
Get the item’s Service Discovery node or nil
| result: | [String] |
# File lib/xmpp4r/iq/query/discoitems.rb, line 140
140: def node
141: attributes['node']
142: end
Set the item’s Service Discovery node
| val: | [String] |
# File lib/xmpp4r/iq/query/discoitems.rb, line 147
147: def node=(val)
148: attributes['node'] = val
149: end
Set the item’s name (chaining-friendly)
| val: | [String] |
# File lib/xmpp4r/iq/query/discoitems.rb, line 132
132: def set_iname(val)
133: self.iname = val
134: self
135: end