Class: Temple::Filters::Ambles
- Inherits:
-
Temple::Filter
- Object
- Temple::Filter
- Temple::Filters::Ambles
- Defined in:
- lib/temple/filters/ambles.rb
Constant Summary
Constants included from Utils
Utils::ESCAPE_HTML, Utils::ESCAPE_HTML_PATTERN
Instance Attribute Summary
Attributes included from Mixins::Options
Instance Method Summary collapse
- #call(ast) ⇒ Object
-
#initialize ⇒ Ambles
constructor
A new instance of Ambles.
Methods included from Mixins::Options
Methods included from Mixins::ControlFlowDispatcher
#on_block, #on_case, #on_cond, #on_if
Methods included from Mixins::EscapeDispatcher
Methods included from Mixins::CoreDispatcher
Methods included from Mixins::CompiledDispatcher
Methods included from Utils
#empty_exp?, #escape_html, #escape_html_safe, #indent_dynamic, #unique_name
Constructor Details
#initialize ⇒ Ambles
Returns a new instance of Ambles.
7 8 9 10 11 |
# File 'lib/temple/filters/ambles.rb', line 7 def initialize(*) super @preamble = [:preamble] @postamble = [:postamble] end |
Instance Method Details
#call(ast) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/temple/filters/ambles.rb', line 13 def call(ast) ret = [:multi] ret << [:static, @preamble] if @preamble ret << ast ret << [:static, @postamble] if @postamble ret end |