Class: EimXML::Comment
- Inherits:
-
Object
- Object
- EimXML::Comment
- Defined in:
- lib/eim_xml.rb
Instance Method Summary collapse
-
#initialize(text) ⇒ Comment
constructor
A new instance of Comment.
- #write_to(out = "") ⇒ Object
Constructor Details
#initialize(text) ⇒ Comment
Returns a new instance of Comment.
56 57 58 59 |
# File 'lib/eim_xml.rb', line 56 def initialize(text) raise ArgumentError, "Can not include '--'" if text =~ /--/ @text = text end |
Instance Method Details
#write_to(out = "") ⇒ Object
61 62 63 |
# File 'lib/eim_xml.rb', line 61 def write_to(out="") out << "<!-- #{@text} -->" end |