Module: CGI::Html4Tr
- Defined in:
- lib/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
2166 2167 2168 |
# File 'lib/cgi.rb', line 2166 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.
2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 |
# File 'lib/cgi.rb', line 2171 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 |