| Class | Jabber::Discovery::IqQueryDiscoInfo |
| In: |
lib/xmpp4r/discovery/iq/discoinfo.rb
|
| Parent: | IqQuery |
Create a new query with namespace jabber.org/protocol/disco#info
# File lib/xmpp4r/discovery/iq/discoinfo.rb, line 21
21: def initialize
22: super
23: add_namespace('http://jabber.org/protocol/disco#info')
24: end
Get the queried Service Discovery node or nil
See IqQueryDiscoItems#node for a small explanation of this.
# File lib/xmpp4r/discovery/iq/discoinfo.rb, line 52
52: def node
53: attributes['node']
54: end
Add a children element
Converts <identity/> elements to [Identity] and <feature/> elements to [Feature]
# File lib/xmpp4r/discovery/iq/discoinfo.rb, line 31
31: def typed_add(element)
32: if element.kind_of?(REXML::Element)
33:
34: if element.name == 'identity'
35: super(Identity::new.import(element))
36: elsif element.name == 'feature'
37: super(Feature::new.import(element))
38: else
39: super(element)
40: end
41:
42: else
43: super(element)
44: end
45: end