Class: Jabber::Discovery::IqQueryDiscoInfo
- Inherits:
-
IqQuery
- Object
- REXML::Element
- XMPPElement
- IqQuery
- Jabber::Discovery::IqQueryDiscoInfo
- Defined in:
- 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)
-
- (Object) features
Get list of features
result
- Array
-
of [String].
-
- (Object) identities
Get list of identities
result
- Array
-
of [Identity].
-
- (Object) identity
Get the first identity child
result
[Identity].
-
- (Object) node
Get the queried Service Discovery node or nil.
-
- (Object) node=(val)
Set the queried Service Discovery node or nil
val
[String].
-
- (Object) set_node(val)
Set 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, #each_elements, #first_element, #first_element_content, #first_element_text, #import, import, #replace_element_content, #replace_element_text, #typed_add
Constructor Details
This class inherits a constructor from Jabber::XMPPElement
Instance Method Details
- (Object) features
Get list of features
result |
|
64 65 66 67 68 69 70 |
# File 'lib/xmpp4r/discovery/iq/discoinfo.rb', line 64 def features res = [] each_element('feature') { |feature| res.push(feature.var) } res end |
- (Object) identities
Get list of identities
result |
|
57 58 59 |
# File 'lib/xmpp4r/discovery/iq/discoinfo.rb', line 57 def identities get_elements('identity') end |
- (Object) identity
Get the first identity child
result |
|
50 51 52 |
# File 'lib/xmpp4r/discovery/iq/discoinfo.rb', line 50 def identity first_element('identity') end |
- (Object) node
Get the queried Service Discovery node or nil
See IqQueryDiscoItems#node for a small explanation of this.
27 28 29 |
# File 'lib/xmpp4r/discovery/iq/discoinfo.rb', line 27 def node attributes['node'] end |
- (Object) node=(val)
Set the queried Service Discovery node or nil
val |
|
34 35 36 |
# File 'lib/xmpp4r/discovery/iq/discoinfo.rb', line 34 def node=(val) attributes['node'] = val end |
- (Object) set_node(val)
Set the queried Service Discovery node or nil (chaining-friendly)
val |
|
42 43 44 45 |
# File 'lib/xmpp4r/discovery/iq/discoinfo.rb', line 42 def set_node(val) self.node = val self end |