Module: CGI::Html4Tr
- Defined in:
- lib/cgialt/html.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
950 951 952 |
# File 'lib/cgialt/html.rb', line 950 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.
955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 |
# File 'lib/cgialt/html.rb', line 955 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 |