class Arboretum::DocTree::Elements::CommentElement
A comment element of a doctree. CommentElements have no tags nor attributes nor contribute to document content, but are preserved in the tree Ex: <!– This is an example comment –>
Attributes
text[RW]
Public Class Methods
new(text='')
click to toggle source
Calls superclass method
Arboretum::DocTree::Elements::Element::new
# File lib/arboretum/doctree.rb, line 1250 def initialize(text='') super() # Comment text @text = text # String end
Public Instance Methods
copy()
click to toggle source
CommentElement
deep copy method
# File lib/arboretum/doctree.rb, line 1258 def copy CommentElement.new(@text) end
dump_markup(type=:xml)
click to toggle source
# File lib/arboretum/doctree.rb, line 1262 def dump_markup(type=:xml) "<!--#{self.text.gsub('&','&').gsub('<', '<').gsub('>','>')}-->" end
to_s()
click to toggle source
# File lib/arboretum/doctree.rb, line 1266 def to_s "<!--#{self.text}-->" end