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

Methods

iname   iname=   jid   jid=   new   node   node=   set_iname   set_jid   set_node  

Public Class methods

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)

[Source]

    # 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

Public Instance methods

Get the item’s name or nil

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

result:[String]

[Source]

     # File lib/xmpp4r/iq/query/discoitems.rb, line 118
118:     def iname
119:       attributes['name']
120:     end

Set the item’s name

val:[String]

[Source]

     # 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]

[Source]

    # File lib/xmpp4r/iq/query/discoitems.rb, line 93
93:     def jid
94:       JID::new(attributes['jid'])
95:     end

Set the item’s jid

val:[JID]

[Source]

     # File lib/xmpp4r/iq/query/discoitems.rb, line 100
100:     def jid=(val)
101:       attributes['jid'] = val.to_s
102:     end

Get the item’s Service Discovery node or nil

result:[String]

[Source]

     # 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]

[Source]

     # 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]

[Source]

     # File lib/xmpp4r/iq/query/discoitems.rb, line 132
132:     def set_iname(val)
133:       self.iname = val
134:       self
135:     end

Set the item’s jid (chaining-friendly)

val:[JID]

[Source]

     # File lib/xmpp4r/iq/query/discoitems.rb, line 107
107:     def set_jid(val)
108:       self.jid = val
109:       self
110:     end

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

val:[String]

[Source]

     # File lib/xmpp4r/iq/query/discoitems.rb, line 154
154:     def set_node(val)
155:       self.node = val
156:       self
157:     end

[Validate]