Class: Jabber::Discovery::Item

Class | Jabber::Discovery::Item
In: | lib/xmpp4r/discovery/iq/discoitems.rb
Parent: | XMPPElement

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

new(jid=nil, iname=nil, node=nil)

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/discovery/iq/discoitems.rb, line 70
    70:       def initialize(jid=nil, iname=nil, node=nil)
    71:         super()
    72:         set_jid(jid)
    73:         set_iname(iname)
    74:         set_node(node)
    75:       end

### Public Instance methods

iname()

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/discovery/iq/discoitems.rb, line 105
    105:       def iname
    106:         attributes['name']
    107:       end

iname=(val)

Set the item‘s name

val: | [String]

[Source]

         # File lib/xmpp4r/discovery/iq/discoitems.rb, line 112
    112:       def iname=(val)
    113:         attributes['name'] = val
    114:       end

jid()

Get the item‘s jid or nil

result: | [String]

[Source]

        # File lib/xmpp4r/discovery/iq/discoitems.rb, line 80
    80:       def jid
    81:         JID.new(attributes['jid'])
    82:       end

jid=(val)

Set the item‘s jid

val: | [JID]

[Source]

        # File lib/xmpp4r/discovery/iq/discoitems.rb, line 87
    87:       def jid=(val)
    88:         attributes['jid'] = val.to_s
    89:       end

node()

Get the item‘s Service Discovery node or nil

result: | [String]

[Source]

         # File lib/xmpp4r/discovery/iq/discoitems.rb, line 127
    127:       def node
    128:         attributes['node']
    129:       end

node=(val)

Set the item‘s Service Discovery node

val: | [String]

[Source]

         # File lib/xmpp4r/discovery/iq/discoitems.rb, line 134
    134:       def node=(val)
    135:         attributes['node'] = val
    136:       end

set_iname(val)

Set the item‘s name (chaining-friendly)

val: | [String]

[Source]

         # File lib/xmpp4r/discovery/iq/discoitems.rb, line 119
    119:       def set_iname(val)
    120:         self.iname = val
    121:         self
    122:       end

set_jid(val)

Set the item‘s jid (chaining-friendly)

val: | [JID]

[Source]

        # File lib/xmpp4r/discovery/iq/discoitems.rb, line 94
    94:       def set_jid(val)
    95:         self.jid = val
    96:         self
    97:       end

set_node(val)

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

val: | [String]

[Source]

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

[Validate]