Class: Jabber::Discovery::IqQueryDiscoInfo
- Inherits:
-
IqQuery
- Object
- REXML::Element
- XMPPElement
- IqQuery
- Jabber::Discovery::IqQueryDiscoInfo
- Defined in:
- lib/gems/xmpp4r-0.4/lib/xmpp4r/discovery/iq/discoinfo.rb
Overview
Class for handling Service Discovery queries, info (JEP 0030)
This <query/> may contain multiple Identity and Feature elements, describing the type and the supported namespaces of the service.
Instance Method Summary collapse
-
#features ⇒ Object
- Get list of features result
- Array
-
of [String].
-
#identities ⇒ Object
- Get list of identities result
- Array
-
of [Identity].
-
#identity ⇒ Object
- Get the first identity child result
-
[Identity].
-
#node ⇒ Object
Get the queried Service Discovery node or nil.
-
#node=(val) ⇒ Object
- Get the queried Service Discovery node or nil val
-
[String].
-
#set_node(val) ⇒ Object
- Get the queried Service Discovery node or nil (chaining-friendly) val
-
[String].
Methods inherited from XMPPElement
class_for_name_xmlns, #clone, force_xmlns, force_xmlns?, import, #initialize, name_xmlns, name_xmlns_for_class, #parent=, #set_xml_lang, #typed_add, #xml_lang, #xml_lang=
Methods inherited from REXML::Element
#==, #delete_elements, #first_element, #first_element_text, #import, import, #replace_element_text, #typed_add
Constructor Details
This class inherits a constructor from Jabber::XMPPElement
Instance Method Details
#features ⇒ Object
Get list of features
- result
- Array
-
of [String]
64 65 66 67 68 69 70 |
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/discovery/iq/discoinfo.rb', line 64 def features res = [] each_element('feature') { |feature| res.push(feature.var) } res end |
#identities ⇒ Object
Get list of identities
- result
- Array
-
of [Identity]
57 58 59 |
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/discovery/iq/discoinfo.rb', line 57 def identities get_elements('identity') end |
#identity ⇒ Object
Get the first identity child
- result
- Identity
50 51 52 |
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/discovery/iq/discoinfo.rb', line 50 def identity first_element('identity') end |
#node ⇒ Object
Get the queried Service Discovery node or nil
See IqQueryDiscoItems#node for a small explanation of this.
27 28 29 |
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/discovery/iq/discoinfo.rb', line 27 def node attributes['node'] end |
#node=(val) ⇒ Object
Get the queried Service Discovery node or nil
- val
- String
34 35 36 |
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/discovery/iq/discoinfo.rb', line 34 def node=(val) attributes['node'] = val end |
#set_node(val) ⇒ Object
Get the queried Service Discovery node or nil (chaining-friendly)
- val
- String
42 43 44 45 |
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/discovery/iq/discoinfo.rb', line 42 def set_node(val) self.node = val self end |