Class: HTML5::TreeBuilders::SimpleTree::CommentNode

Inherits:
Node show all
Defined in:
lib/html5/treebuilders/simpletree.rb

Instance Attribute Summary

Attributes inherited from Node

#attributes, #name, #value

Attributes inherited from Base::Node

#childNodes, #flags, #parent

Instance Method Summary collapse

Methods inherited from Node

#appendChild, #cloneNode, #hasContent, #insertBefore, #insertText, #printTree, #removeChild

Methods inherited from Base::Node

#appendChild, #cloneNode, #hasContent, #insertBefore, #insertText, #removeChild, #reparentChildren

Constructor Details

#initialize(value) ⇒ CommentNode

Returns a new instance of CommentNode.



160
161
162
163
# File 'lib/html5/treebuilders/simpletree.rb', line 160

def initialize value
  super nil
  @value = value
end

Instance Method Details

#to_sObject



165
166
167
# File 'lib/html5/treebuilders/simpletree.rb', line 165

def to_s
  "<!-- %s -->" % value
end