class XML::Smart::Dom::Attribute
Public Class Methods
new(attr)
click to toggle source
# File lib/xml/smart_domattribute.rb, line 6 def initialize(attr) @node = attr end
Public Instance Methods
==(other)
click to toggle source
# File lib/xml/smart_domattribute.rb, line 22 def ==(other) return false unless other return false unless other.respond_to?(:unique_id) unique_id == other.unique_id end
===(cls)
click to toggle source
# File lib/xml/smart_domattribute.rb, line 10 def ===(cls); self.is_a? cls; end
parent()
click to toggle source
# File lib/xml/smart_domattribute.rb, line 29 def parent; Dom::smart_helper(@node.parent); end
path()
click to toggle source
# File lib/xml/smart_domattribute.rb, line 17 def path; @node.path; end
qname()
click to toggle source
# File lib/xml/smart_domattribute.rb, line 16 def qname; QName.new @node; end
to_f()
click to toggle source
# File lib/xml/smart_domattribute.rb, line 14 def to_f; @node.content.to_f; end
to_i()
click to toggle source
# File lib/xml/smart_domattribute.rb, line 13 def to_i; @node.content.to_i; end
to_s()
click to toggle source
# File lib/xml/smart_domattribute.rb, line 12 def to_s; @node.content; end
unique_id()
click to toggle source
# File lib/xml/smart_domattribute.rb, line 27 def unique_id; @node.pointer_id; end
value()
click to toggle source
# File lib/xml/smart_domattribute.rb, line 19 def value; @node.content; end
Also aliased as: text
value=(val)
click to toggle source
# File lib/xml/smart_domattribute.rb, line 20 def value=(val); @node.content = val; end
Also aliased as: text=