Class: Jabber::Discovery::Feature
- Inherits:
-
REXML::Element
- Object
- REXML::Element
- Jabber::Discovery::Feature
- Defined in:
- lib/xmpp4r/discovery/iq/discoinfo.rb
Overview
Service Discovery feature to add() to IqQueryDiscoInfo
Please note that JEP 0030 requires var to be set
Instance Method Summary collapse
-
#initialize(var = nil) ⇒ Feature
constructor
- Create a new <feature/> element var
- String
-
New var.
-
#set_var(val) ⇒ Object
- Set the feature’s var (chaining-friendly) val
-
[String].
-
#var ⇒ Object
- Get the feature’s var or nil result
-
[String].
-
#var=(val) ⇒ Object
Set the feature’s var.
Methods inherited from REXML::Element
#delete_elements, #first_element, #first_element_text, #import, import, #replace_element_text, #typed_add
Constructor Details
#initialize(var = nil) ⇒ Feature
Create a new <feature/> element
- var
- String
-
New var
194 195 196 197 |
# File 'lib/xmpp4r/discovery/iq/discoinfo.rb', line 194 def initialize(var=nil) super('feature') set_var(var) end |
Instance Method Details
#set_var(val) ⇒ Object
Set the feature’s var (chaining-friendly)
- val
- String
218 219 220 221 |
# File 'lib/xmpp4r/discovery/iq/discoinfo.rb', line 218 def set_var(val) self.var = val self end |
#var ⇒ Object
Get the feature’s var or nil
- result
- String
202 203 204 |
# File 'lib/xmpp4r/discovery/iq/discoinfo.rb', line 202 def var attributes['var'] end |
#var=(val) ⇒ Object
Set the feature’s var
This is a namespace the identity supports.
- val
- String
211 212 213 |
# File 'lib/xmpp4r/discovery/iq/discoinfo.rb', line 211 def var=(val) attributes['var'] = val end |