Class: HTML5::TreeBuilders::SimpleTree::TreeBuilder

Inherits:
Base::TreeBuilder show all
Defined in:
lib/feed_tools/vendor/html5/lib/html5/treebuilders/simpletree.rb

Instance Attribute Summary

Attributes inherited from Base::TreeBuilder

#activeFormattingElements, #document, #formPointer, #head_pointer, #open_elements

Instance Method Summary collapse

Methods inherited from Base::TreeBuilder

#clearActiveFormattingElements, #createElement, #elementInActiveFormattingElements, #elementInScope, #generateImpliedEndTags, #getTableMisnestedNodePosition, #get_document, #insertDoctype, #insertText, #insert_comment, #insert_element, #insert_elementNormal, #insert_elementTable, #insert_from_table=, #reconstructActiveFormattingElements, #reset

Constructor Details

#initializeTreeBuilder

Returns a new instance of TreeBuilder.



165
166
167
168
169
170
171
# File 'lib/feed_tools/vendor/html5/lib/html5/treebuilders/simpletree.rb', line 165

def initialize
  @documentClass = Document
  @doctypeClass  = DocumentType
  @elementClass  = Element
  @commentClass  = CommentNode
  @fragmentClass = DocumentFragment
end

Instance Method Details

#get_fragmentObject



177
178
179
180
# File 'lib/feed_tools/vendor/html5/lib/html5/treebuilders/simpletree.rb', line 177

def get_fragment
  @document = super
  @document
end

#testSerializer(node) ⇒ Object



173
174
175
# File 'lib/feed_tools/vendor/html5/lib/html5/treebuilders/simpletree.rb', line 173

def testSerializer node
  node.printTree
end