Class: Haml::HTML
- Inherits:
-
Temple::HTML::Fast
- Object
- Temple::HTML::Fast
- Haml::HTML
- Defined in:
- lib/haml/html.rb
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ HTML
constructor
A new instance of HTML.
-
#on_html_condcomment(condition, content, revealed = false)
This dispatcher supports Haml’s “revealed” conditional comment.
Constructor Details
#initialize(opts = {}) ⇒ HTML
Returns a new instance of HTML.
6 7 8 9 10 11 12 |
# File 'lib/haml/html.rb', line 6
def initialize(opts = {})
if DEPRECATED_FORMATS.include?(opts[:format])
opts = opts.dup
opts[:format] = :html
end
super(opts)
end
|
Instance Method Details
#on_html_condcomment(condition, content, revealed = false)
This dispatcher supports Haml’s “revealed” conditional comment.
15 16 17 18 19 20 |
# File 'lib/haml/html.rb', line 15
def on_html_condcomment(condition, content, revealed = false)
on_html_comment [:multi,
[:static, "[#{condition}]>#{'<!-->' if revealed}"],
content,
[:static, "#{'<!--' if revealed}<![endif]"]]
end
|