Class HTML5::TreeBuilders::Hpricot::DocumentType
In: lib/feed_tools/vendor/html5/lib/html5/treebuilders/hpricot.rb
Parent: Node

Methods

Public Class methods

[Source]

     # File lib/feed_tools/vendor/html5/lib/html5/treebuilders/hpricot.rb, line 149
149:         def self.hpricot_class
150:           ::Hpricot::DocType
151:         end

[Source]

     # File lib/feed_tools/vendor/html5/lib/html5/treebuilders/hpricot.rb, line 153
153:         def initialize(name, public_id, system_id)
154:           begin
155:             super(name)
156:           rescue ArgumentError # needs 3...
157:           end
158: 
159:           @hpricot = ::Hpricot::DocType.new(name, public_id, system_id)
160:         end

Public Instance methods

[Source]

     # File lib/feed_tools/vendor/html5/lib/html5/treebuilders/hpricot.rb, line 162
162:         def printTree(indent=0)
163:           if hpricot.target and hpricot.target.any?
164:             "\n|#{' ' * indent}<!DOCTYPE #{hpricot.target}>"
165:           else
166:             "\n|#{' ' * indent}<!DOCTYPE >"
167:           end
168:         end

[Validate]