Class: HTML5::TreeBuilders::SimpleTree::DocumentFragment

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

Instance Attribute Summary

Attributes inherited from Element

#namespace

Attributes inherited from Node

#attributes, #name, #value

Attributes inherited from Base::Node

#childNodes, #flags, #parent

Instance Method Summary collapse

Methods inherited from Element

#to_s

Methods inherited from Node

#appendChild, #cloneNode, #hasContent, #insertBefore, #insertText, #removeChild

Methods inherited from Base::Node

#appendChild, #cloneNode, #hasContent, #insertBefore, #insertText, #removeChild, #reparentChildren

Constructor Details

#initializeDocumentFragment

Returns a new instance of DocumentFragment.



135
136
137
# File 'lib/html5/treebuilders/simpletree.rb', line 135

def initialize
  super nil
end

Instance Method Details

#printTree(indent = 0) ⇒ Object



139
140
141
142
143
144
145
# File 'lib/html5/treebuilders/simpletree.rb', line 139

def printTree indent=0
  tree = ""
  for child in childNodes
    tree += child.printTree(indent+2)
  end
  return tree
end