Class: HTML5::TreeBuilders::Hpricot::Document
- Inherits:
-
Node
- Object
- Base::Node
- Node
- HTML5::TreeBuilders::Hpricot::Document
- Defined in:
- lib/feed_tools/vendor/html5/lib/html5/treebuilders/hpricot.rb
Instance Attribute Summary
Attributes inherited from Node
Attributes inherited from Base::Node
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Document
constructor
A new instance of Document.
- #printTree(indent = 0) ⇒ Object
Methods inherited from Node
#appendChild, #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.
137 138 139 |
# File 'lib/feed_tools/vendor/html5/lib/html5/treebuilders/hpricot.rb', line 137 def initialize super(nil) end |
Class Method Details
.hpricot_class ⇒ Object
133 134 135 |
# File 'lib/feed_tools/vendor/html5/lib/html5/treebuilders/hpricot.rb', line 133 def self.hpricot_class ::Hpricot::Doc end |
Instance Method Details
#printTree(indent = 0) ⇒ Object
141 142 143 |
# File 'lib/feed_tools/vendor/html5/lib/html5/treebuilders/hpricot.rb', line 141 def printTree(indent=0) childNodes.inject('#document') { |tree, child| tree + child.printTree(indent + 2) } end |