Class: Hpricot::DocType
- Defined in:
- lib/hpricot/tag.rb,
lib/hpricot/modules.rb,
lib/hpricot/modules.rb,
ext/hpricot_scan/hpricot_scan.c
Defined Under Namespace
Modules: Trav
Constant Summary
Constants included from Hpricot
AttrCore, AttrEvents, AttrFocus, AttrHAlign, AttrI18n, AttrVAlign, Attrs, ElementContent, ElementExclusions, ElementInclusions, FORM_TAGS, NamedCharacters, NamedCharactersPattern, OmittedAttrName, SELF_CLOSING_TAGS
Instance Method Summary collapse
- #clear_raw ⇒ Object
-
#initialize(target, pub, sys) ⇒ DocType
constructor
A new instance of DocType.
- #output(out, opts = {}) ⇒ Object
- #pathname ⇒ Object
- #public_id ⇒ Object
- #public_id= ⇒ Object
- #raw_string ⇒ Object
- #system_id ⇒ Object
- #system_id= ⇒ Object
- #target ⇒ Object
- #target= ⇒ Object
Methods included from Leaf::Trav
#traverse_all_element, #traverse_some_element, #traverse_text_internal
Methods included from Traverse
#after, #at, #before, #bogusetag?, #children_of_type, #clean_path, #comment?, #css_path, #doc?, #doctype?, #elem?, filter, #following, #get_subnode, #html, #index, #inner_html=, #inner_text, #make, #next, #node_position, #nodes_at, #position, #preceding, #previous, #procins?, #search, #swap, #text?, #to_html, #to_original_html, #to_plain_text, #traverse_element, #traverse_text, #xmldecl?, #xpath
Methods included from Leaf
Methods included from Node
#altered!, #html_quote, #if_output, #inspect_tree
Methods included from Hpricot
XML, build, css, make, parse, scan, uxs, xchr, xs
Constructor Details
#initialize(target, pub, sys) ⇒ DocType
Returns a new instance of DocType.
180 181 182 |
# File 'lib/hpricot/tag.rb', line 180 def initialize target, pub, sys self.target, self.public_id, self.system_id = target, pub, sys end |
Instance Method Details
#clear_raw ⇒ Object
#output(out, opts = {}) ⇒ Object
184 185 186 187 188 189 190 191 |
# File 'lib/hpricot/tag.rb', line 184 def output(out, opts = {}) out << if_output(opts) do "<!DOCTYPE #{target} " + (public_id ? "PUBLIC \"#{public_id}\"" : "SYSTEM") + (system_id ? " #{html_quote(system_id)}" : "") + ">" end end |
#pathname ⇒ Object
183 |
# File 'lib/hpricot/tag.rb', line 183 def pathname; "doctype()" end |