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.
47 48 49 50 51 |
# File 'lib/eim_xml.rb', line 47 def initialize(text) raise ArgumentError, "Can not include '--'" if text =~ /--/ @text = text end |
Instance Method Details
#write_to(out = '') ⇒ Object
53 54 55 |
# File 'lib/eim_xml.rb', line 53 def write_to(out = '') out << "<!-- #{@text} -->" end |