Class: HTML5::TreeBuilders::SimpleTree::Document
- Inherits:
-
Node
- Object
- Base::Node
- Node
- HTML5::TreeBuilders::SimpleTree::Document
- Defined in:
- lib/html5/treebuilders/simpletree.rb
Instance Attribute Summary
Attributes inherited from Node
Attributes inherited from Base::Node
Instance Method Summary collapse
-
#initialize ⇒ Document
constructor
A new instance of Document.
- #printTree(indent = 0) ⇒ Object
- #to_s ⇒ Object
Methods inherited from Node
#appendChild, #cloneNode, #hasContent, #insertBefore, #insertText, #removeChild
Methods inherited from Base::Node
#appendChild, #cloneNode, #hasContent, #insertBefore, #insertText, #removeChild, #reparentChildren
Constructor Details
#initialize ⇒ Document
Returns a new instance of Document.
101 102 103 |
# File 'lib/html5/treebuilders/simpletree.rb', line 101 def initialize super nil end |
Instance Method Details
#printTree(indent = 0) ⇒ Object
105 106 107 108 109 110 111 |
# File 'lib/html5/treebuilders/simpletree.rb', line 105 def printTree indent=0 tree = to_s for child in childNodes tree += child.printTree(indent + 2) end tree end |
#to_s ⇒ Object
97 98 99 |
# File 'lib/html5/treebuilders/simpletree.rb', line 97 def to_s "#document" end |