Class: XmlParsable::Elements::XmlElement::Text

Inherits:
Object
  • Object
show all
Defined in:
lib/xmlparsable/elements/xml.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text, parent) ⇒ Text

Returns a new instance of Text.



58
59
60
# File 'lib/xmlparsable/elements/xml.rb', line 58

def initialize(text, parent)
  @text, @parent = text, parent
end

Instance Attribute Details

#parentObject (readonly)

Returns the value of attribute parent.



56
57
58
# File 'lib/xmlparsable/elements/xml.rb', line 56

def parent
  @parent
end

#textObject (readonly)

Returns the value of attribute text.



56
57
58
# File 'lib/xmlparsable/elements/xml.rb', line 56

def text
  @text
end

Instance Method Details

#to_s(buffer = "") ⇒ Object



62
63
64
# File 'lib/xmlparsable/elements/xml.rb', line 62

def to_s(buffer = "")
  buffer << @text
end