Class: Xhtml5Template
- Inherits:
-
XhtmlTemplate
- Object
- HtmlTemplate
- XhtmlTemplate
- Xhtml5Template
- Defined in:
- lib/htmlelement/htmltemplate.rb
Constant Summary
Constants inherited from HtmlTemplate
HtmlTemplate::ELEMENT, HtmlTemplate::LANGUAGE, HtmlTemplate::META_CHARSET
Instance Attribute Summary
Attributes inherited from HtmlTemplate
Class Method Summary collapse
Instance Method Summary collapse
- #charset=(charset_name) ⇒ Object
-
#initialize(*params) ⇒ Xhtml5Template
constructor
A new instance of Xhtml5Template.
- #set_charset_in_meta(charset) ⇒ Object
Methods inherited from XhtmlTemplate
Methods inherited from HtmlTemplate
#add_css_file, #add_skip_link, #base=, #create_element, #default_css=, #embed_style, #euc_jp!, #language=, #latin1!, #push, #sjis!, #to_s, #utf8!
Constructor Details
#initialize(*params) ⇒ Xhtml5Template
Returns a new instance of Xhtml5Template.
187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/htmlelement/htmltemplate.rb', line 187 def initialize(*params) super(*params) def @content_language.to_str "" end def @content_script_type.to_str "" end end |
Class Method Details
.to_str ⇒ Object
190 191 192 |
# File 'lib/htmlelement/htmltemplate.rb', line 190 def @content_language.to_str "" end |
Instance Method Details
#charset=(charset_name) ⇒ Object
203 204 205 206 |
# File 'lib/htmlelement/htmltemplate.rb', line 203 def charset=(charset_name) @charset=charset_name @content_type["charset"] = @charset end |
#set_charset_in_meta(charset) ⇒ Object
199 200 201 |
# File 'lib/htmlelement/htmltemplate.rb', line 199 def (charset) create_element("meta", nil, "charset" => charset) end |