# File lib/feed_tools/vendor/html5/lib/html5/treebuilders/hpricot.rb, line 112 def attributes AttributeProxy.new(@hpricot) end
# File lib/feed_tools/vendor/html5/lib/html5/treebuilders/hpricot.rb, line 116 def attributes=(attrs) attrs.each { |name, value| @hpricot[name] = value } end
# File lib/feed_tools/vendor/html5/lib/html5/treebuilders/hpricot.rb, line 80 def cloneNode attributes.inject(self.class.new(name)) do |node, (name, value)| node.hpricot[name] = value node end end
# File lib/feed_tools/vendor/html5/lib/html5/treebuilders/hpricot.rb, line 76 def name @hpricot.stag.name end
# File lib/feed_tools/vendor/html5/lib/html5/treebuilders/hpricot.rb, line 120 def printTree(indent=0) tree = "\n|#{' ' * indent}<#{name}>" indent += 2 attributes.each do |name, value| next if name == 'xmlns' tree += "\n|#{' ' * indent}#{name}=\"#{value}\"" end childNodes.inject(tree) { |tree, child| tree + child.printTree(indent) } end
Generated with the Darkfish Rdoc Generator 2.