Module: CGI::Html4Fr
- Defined in:
- lib/cgi.rb
Overview
Mixin module for generating HTML version 4 with framesets.
Instance Method Summary collapse
-
#doctype ⇒ Object
The DOCTYPE declaration for this version of HTML.
-
#element_init ⇒ Object
Initialise the HTML generation methods for this version.
Instance Method Details
#doctype ⇒ Object
The DOCTYPE declaration for this version of HTML
2221 2222 2223 |
# File 'lib/cgi.rb', line 2221 def doctype %|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">| end |
#element_init ⇒ Object
Initialise the HTML generation methods for this version.
2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 |
# File 'lib/cgi.rb', line 2226 def element_init methods = "" # - - for element in %w[ FRAMESET ] methods += " def \#{element.downcase}(attributes = {})\n BEGIN\n end\n END\n end\n\n # - O EMPTY\n for element in %w[ FRAME ]\n methods += <<-BEGIN + nOE_element_def(element) + <<-END\n def \#{element.downcase}(attributes = {})\n BEGIN\n end\n END\n end\n eval(methods)\nend\n" + nn_element_def(element) + "" |