Class: Blather::Stanza::DiscoInfo::Feature
- Inherits:
-
XMPPNode
- Object
- Niceogiri::XML::Node
- XMPPNode
- Blather::Stanza::DiscoInfo::Feature
- Defined in:
- lib/blather/stanza/disco/disco_info.rb
Overview
DiscoInfo::Feature
Constant Summary
Constants inherited from XMPPNode
Class Method Summary collapse
-
.new(var) ⇒ DiscoInfo::Feature
Create a new DiscoInfo::Feature object.
Instance Method Summary collapse
-
#eql?(o, *fields) ⇒ true, false
Compare two DiscoInfo::Feature objects by name, type and category.
-
#var ⇒ String
The Feature’s var.
-
#var=(var) ⇒ Object
Set the Feature’s var.
Methods inherited from XMPPNode
class_from_registration, #decorate, decorator_modules, import, parse, register, #to_stanza
Class Method Details
.new(node) ⇒ DiscoInfo::Feature .new(var) ⇒ DiscoInfo::Feature
Create a new DiscoInfo::Feature object
172 173 174 175 176 177 178 179 180 181 |
# File 'lib/blather/stanza/disco/disco_info.rb', line 172 def self.new(var) new_node = super :feature case var when Nokogiri::XML::Node new_node.inherit var else new_node.var = var end new_node end |
Instance Method Details
#eql?(o, *fields) ⇒ true, false
Compare two DiscoInfo::Feature objects by name, type and category
198 199 200 |
# File 'lib/blather/stanza/disco/disco_info.rb', line 198 def eql?(o, *fields) super o, *(fields + [:var]) end |
#var ⇒ String
The Feature’s var
185 186 187 |
# File 'lib/blather/stanza/disco/disco_info.rb', line 185 def var read_attr :var end |
#var=(var) ⇒ Object
Set the Feature’s var
191 192 193 |
# File 'lib/blather/stanza/disco/disco_info.rb', line 191 def var=(var) write_attr :var, var end |