class XML::Smart::Dom::Text

Public Class Methods

new(text) click to toggle source
# File lib/xml/smart_domtext.rb, line 6
def initialize(text); @node = text; end

Public Instance Methods

===(cls) click to toggle source
# File lib/xml/smart_domtext.rb, line 8
def ===(cls); self.is_a? cls; end
dump() click to toggle source
# File lib/xml/smart_domtext.rb, line 10
def dump; to_s; end
parent() click to toggle source
# File lib/xml/smart_domtext.rb, line 18
def parent; Node.new(@node.parent); end
path() click to toggle source
# File lib/xml/smart_domtext.rb, line 20
def path; @node.path; end
text() click to toggle source
# File lib/xml/smart_domtext.rb, line 15
def text; @node.content; end
text=(t) click to toggle source
# File lib/xml/smart_domtext.rb, line 16
def text=(t); @node.content = t.to_s if t.respond_to? :to_s; end
to_f() click to toggle source
# File lib/xml/smart_domtext.rb, line 12
def to_f; @node.content.to_f; end
to_i() click to toggle source
# File lib/xml/smart_domtext.rb, line 13
def to_i; @node.content.to_i; end
to_s() click to toggle source
# File lib/xml/smart_domtext.rb, line 11
def to_s; @node.content.to_s; end