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

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

Instance Attribute Summary

Attributes inherited from Base::TreeBuilder

#activeFormattingElements, #document, #formPointer, #head_pointer, #insert_from_table, #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_foreign_element, #reconstructActiveFormattingElements, #reset

Constructor Details

#initializeTreeBuilder

Returns a new instance of TreeBuilder.



171
172
173
174
175
176
177
# File 'lib/html5/treebuilders/simpletree.rb', line 171

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

Instance Method Details

#get_fragmentObject



183
184
185
186
# File 'lib/html5/treebuilders/simpletree.rb', line 183

def get_fragment
  @document = super
  @document
end

#testSerializer(node) ⇒ Object



179
180
181
# File 'lib/html5/treebuilders/simpletree.rb', line 179

def testSerializer node
  node.printTree
end