class Hermes::XHtml
Public Instance Methods
a(attrs = nil)
click to toggle source
Calls superclass method
# File lib/hermes/html.rb, line 121 def a attrs = nil attrs[ :name] ||= attrs[ :id] if attrs super end
document(out = nil) { || ... }
click to toggle source
Calls superclass method
Hermes::Html#document
# File lib/hermes/html.rb, line 107 def document out = nil super do @generator.close_standalone = true @generator.assign_attributes = true yield end end
html(attrs = nil)
click to toggle source
Calls superclass method
# File lib/hermes/html.rb, line 115 def html attrs = nil attrs ||= {} attrs[ :xmlns] ||= "http://www.w3.org/1999/xhtml" super end
quote_script(str)
click to toggle source
# File lib/hermes/html.rb, line 126 def quote_script str @generator.commented_cdata str end
Private Instance Methods
doctype_header()
click to toggle source
Calls superclass method
Hermes::Html#doctype_header
# File lib/hermes/html.rb, line 132 def doctype_header prop = { version: "1.0", encoding: @generator.encoding } @generator.pi_tag :xml, prop super end
doctype_header_data() { |"html", "XHTML 0", "xhtml1/DTD", *vf| ... }
click to toggle source
# File lib/hermes/html.rb, line 138 def doctype_header_data vf = case DOCTYPE when "strict" then [ "Strict", "xhtml1-strict" ] when "transitional" then [ "Transitional", "xhtml1-transitional"] when "frameset" then [ "Frameset", "xhtml1-frameset" ] end yield "html", "XHTML 1.0", "xhtml1/DTD", *vf end