Class: TaskJuggler::XMLComment

Inherits:
XMLElement show all
Defined in:
lib/taskjuggler/XMLElement.rb

Overview

This is a specialized XMLElement to represent a comment.

Instance Method Summary collapse

Methods inherited from XMLElement

#<<, #[], #[]=

Constructor Details

#initialize(text = '') ⇒ XMLComment

Returns a new instance of XMLComment.



201
202
203
204
# File 'lib/taskjuggler/XMLElement.rb', line 201

def initialize(text = '')
  super(nil, {})
  @text = text
end

Instance Method Details

#to_s(indent) ⇒ Object



206
207
208
# File 'lib/taskjuggler/XMLElement.rb', line 206

def to_s(indent)
  '<!-- ' + canonicalize_comment(@text) + " -->\n#{' ' * indent}"
end