Class: XmlParsable::Elements::XmlElement::Text
- Inherits:
-
Object
- Object
- XmlParsable::Elements::XmlElement::Text
- Defined in:
- lib/xmlparsable/elements/xml.rb
Instance Attribute Summary collapse
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text, parent) ⇒ Text
constructor
A new instance of Text.
- #to_s(buffer = "") ⇒ Object
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
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
56 57 58 |
# File 'lib/xmlparsable/elements/xml.rb', line 56 def parent @parent end |
#text ⇒ Object (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 |