Module: Temple::HTML::Dispatcher Private
- Included in:
- Filter
- Defined in:
- lib/temple/html/dispatcher.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #on_html_attr(name, content) ⇒ Object private
- #on_html_attrs(*attrs) ⇒ Object private
- #on_html_comment(content) ⇒ Object private
- #on_html_condcomment(condition, content) ⇒ Object private
- #on_html_js(content) ⇒ Object private
- #on_html_tag(name, attrs, content = nil) ⇒ Object private
Instance Method Details
#on_html_attr(name, content) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
10 11 12 |
# File 'lib/temple/html/dispatcher.rb', line 10 def on_html_attr(name, content) [:html, :attr, name, compile(content)] end |
#on_html_attrs(*attrs) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
6 7 8 |
# File 'lib/temple/html/dispatcher.rb', line 6 def on_html_attrs(*attrs) [:html, :attrs, *attrs.map {|a| compile(a) }] end |
#on_html_comment(content) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 |
# File 'lib/temple/html/dispatcher.rb', line 14 def on_html_comment(content) [:html, :comment, compile(content)] end |
#on_html_condcomment(condition, content) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 |
# File 'lib/temple/html/dispatcher.rb', line 18 def on_html_condcomment(condition, content) [:html, :condcomment, condition, compile(content)] end |
#on_html_js(content) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
22 23 24 |
# File 'lib/temple/html/dispatcher.rb', line 22 def on_html_js(content) [:html, :js, compile(content)] end |
#on_html_tag(name, attrs, content = nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
26 27 28 29 |
# File 'lib/temple/html/dispatcher.rb', line 26 def on_html_tag(name, attrs, content = nil) result = [:html, :tag, name, compile(attrs)] content ? (result << compile(content)) : result end |