Class: HTML5::TreeBuilders::Hpricot::DocumentFragment
- Inherits:
-
Element
- Object
- Base::Node
- Node
- Element
- HTML5::TreeBuilders::Hpricot::DocumentFragment
- Defined in:
- lib/feed_tools/vendor/html5/lib/html5/treebuilders/hpricot.rb
Instance Attribute Summary
Attributes inherited from Node
Attributes inherited from Base::Node
Instance Method Summary collapse
-
#initialize ⇒ DocumentFragment
constructor
A new instance of DocumentFragment.
- #printTree(indent = 0) ⇒ Object
Methods inherited from Element
#attributes, #attributes=, #cloneNode, hpricot_class, #name
Methods inherited from Node
#appendChild, #hasContent, #insertBefore, #insertText, #removeChild
Methods inherited from Base::Node
#appendChild, #cloneNode, #hasContent, #insertBefore, #insertText, #removeChild, #reparentChildren
Constructor Details
#initialize ⇒ DocumentFragment
Returns a new instance of DocumentFragment.
172 173 174 |
# File 'lib/feed_tools/vendor/html5/lib/html5/treebuilders/hpricot.rb', line 172 def initialize super('') end |
Instance Method Details
#printTree(indent = 0) ⇒ Object
176 177 178 |
# File 'lib/feed_tools/vendor/html5/lib/html5/treebuilders/hpricot.rb', line 176 def printTree(indent=0) childNodes.inject('') {|tree, child| tree + child.printTree(indent + 2) } end |