Class: TaskJuggler::XMLComment
- Inherits:
-
XMLElement
- Object
- XMLElement
- TaskJuggler::XMLComment
- Defined in:
- lib/taskjuggler/XMLElement.rb
Overview
This is a specialized XMLElement to represent a comment.
Instance Method Summary collapse
-
#initialize(text = +'')) ⇒ XMLComment
constructor
A new instance of XMLComment.
- #to_s(indent) ⇒ Object
Methods inherited from XMLElement
Constructor Details
#initialize(text = +'')) ⇒ XMLComment
Returns a new instance of XMLComment.
202 203 204 205 |
# File 'lib/taskjuggler/XMLElement.rb', line 202 def initialize(text = +'') super(nil, {}) @text = text end |
Instance Method Details
#to_s(indent) ⇒ Object
207 208 209 |
# File 'lib/taskjuggler/XMLElement.rb', line 207 def to_s(indent) '<!-- ' + canonicalize_comment(@text) + " -->\n#{' ' * indent}" end |