Class: Haml::Ambles
- Inherits:
-
Temple::Filter
- Object
- Temple::Filter
- Haml::Ambles
- Defined in:
- lib/haml/ambles.rb
Instance Method Summary collapse
- #call(ast) ⇒ Object
-
#initialize ⇒ Ambles
constructor
A new instance of Ambles.
Constructor Details
#initialize ⇒ Ambles
Returns a new instance of Ambles.
6 7 8 9 10 |
# File 'lib/haml/ambles.rb', line 6 def initialize(*) super @preamble = [:preamble] @postamble = [:postamble] end |
Instance Method Details
#call(ast) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/haml/ambles.rb', line 12 def call(ast) ret = [:multi] ret << [:static, @preamble] if @preamble ret << ast ret << [:static, @postamble] if @postamble ret end |