Class: XmlParsable::Elements::XmlElement::Comment
- Inherits:
-
Object
- Object
- XmlParsable::Elements::XmlElement::Comment
- 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) ⇒ Comment
constructor
A new instance of Comment.
- #to_s(buffer = "") ⇒ Object
Constructor Details
#initialize(text, parent) ⇒ Comment
Returns a new instance of Comment.
70 71 72 |
# File 'lib/xmlparsable/elements/xml.rb', line 70 def initialize(text, parent) @text, @parent = text, parent end |
Instance Attribute Details
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
68 69 70 |
# File 'lib/xmlparsable/elements/xml.rb', line 68 def parent @parent end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
68 69 70 |
# File 'lib/xmlparsable/elements/xml.rb', line 68 def text @text end |
Instance Method Details
#to_s(buffer = "") ⇒ Object
74 75 76 |
# File 'lib/xmlparsable/elements/xml.rb', line 74 def to_s(buffer = "") buffer << "<!--" << @text << "-->" end |