class Blather::Stanza::DiscoInfo::Feature
Public Class Methods
new(var)
click to toggle source
Create a new DiscoInfo::Feature
object @overload new(node)
Create a new Feature by importing an XML::Node @param [XML::Node] node an XML::Node to import
@overload new(var)
Create a new feature by var @param [String] var a the Feautre's var
@return [DiscoInfo::Feature]
Calls superclass method
# File lib/blather/stanza/disco/disco_info.rb, line 174 def self.new(var) return var if var.class == self new_node = super :feature case var when Nokogiri::XML::Node new_node.inherit var else new_node.var = var end new_node end
Public Instance Methods
eql?(o, *fields)
click to toggle source
Compare two DiscoInfo::Feature
objects by name, type and category @param [DiscoInfo::Feature] o the Identity
object to compare against @return [true, false]
Calls superclass method
# File lib/blather/stanza/disco/disco_info.rb, line 202 def eql?(o, *fields) super o, *(fields + [:var]) end
var()
click to toggle source
The Feature's var @return [String]
# File lib/blather/stanza/disco/disco_info.rb, line 189 def var read_attr :var end
var=(var)
click to toggle source
Set the Feature's var @param [String] var the new var
# File lib/blather/stanza/disco/disco_info.rb, line 195 def var=(var) write_attr :var, var end