Class: HTML5::TreeBuilders::Hpricot::TextNode
- Inherits:
-
Node
- Object
- Base::Node
- Node
- HTML5::TreeBuilders::Hpricot::TextNode
- 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(data) ⇒ TextNode
constructor
A new instance of TextNode.
- #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(data) ⇒ TextNode
Returns a new instance of TextNode.
182 183 184 |
# File 'lib/feed_tools/vendor/html5/lib/html5/treebuilders/hpricot.rb', line 182 def initialize(data) @hpricot = ::Hpricot::Text.new(data) end |
Instance Method Details
#printTree(indent = 0) ⇒ Object
186 187 188 |
# File 'lib/feed_tools/vendor/html5/lib/html5/treebuilders/hpricot.rb', line 186 def printTree(indent=0) "\n|#{' ' * indent}\"#{hpricot.content}\"" end |