class Haml::Ambles

Public Class Methods

new(*) click to toggle source
Calls superclass method
# File lib/haml/ambles.rb, line 6
def initialize(*)
  super
  @preamble = options[:preamble]
  @postamble = options[:postamble]
end

Public Instance Methods

call(ast) click to toggle source
# 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