Module: CGI::Html4Tr
- Defined in:
- lib/rubysl/cgi/cgi.rb
Overview
Mixin module for HTML version 4 transitional generation methods.
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
2195 2196 2197 |
# File 'lib/rubysl/cgi/cgi.rb', line 2195 def doctype %|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">| end |
#element_init ⇒ Object
Initialise the HTML generation methods for this version.
2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 |
# File 'lib/rubysl/cgi/cgi.rb', line 2200 def element_init extend TagMaker methods = "" # - - for element in %w[ TT I B U S STRIKE BIG SMALL EM STRONG DFN CODE SAMP KBD VAR CITE ABBR ACRONYM FONT SUB SUP SPAN BDO ADDRESS DIV CENTER MAP OBJECT APPLET H1 H2 H3 H4 H5 H6 PRE Q INS DEL DL OL UL DIR MENU LABEL SELECT OPTGROUP FIELDSET LEGEND BUTTON TABLE IFRAME NOFRAMES TITLE STYLE SCRIPT NOSCRIPT TEXTAREA FORM A BLOCKQUOTE CAPTION ] methods += <<-BEGIN + nn_element_def(element) + <<-END end END end # - O EMPTY for element in %w[ IMG BASE BASEFONT BR AREA LINK PARAM HR INPUT COL ISINDEX META ] methods += <<-BEGIN + nOE_element_def(element) + <<-END end END end # O O or - O for element in %w[ HTML BODY P DT DD LI OPTION THEAD TFOOT TBODY COLGROUP TR TH TD HEAD ] methods += <<-BEGIN + nO_element_def(element) + <<-END end END end eval(methods) end |