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.
107 108 109 |
# File 'lib/html5/treebuilders/simpletree.rb', line 107 def initialize super nil end |
Instance Method Details
#printTree(indent = 0) ⇒ Object
111 112 113 114 115 116 117 |
# File 'lib/html5/treebuilders/simpletree.rb', line 111 def printTree indent=0 tree = to_s for child in childNodes tree += child.printTree(indent + 2) end tree end |
#to_s ⇒ Object
103 104 105 |
# File 'lib/html5/treebuilders/simpletree.rb', line 103 def to_s "#document" end |