class Padrino::Helpers::OutputHelpers::HamlHandler


Handler for reading and writing from a haml template.
#

def block_is_type?(block)


@handler.block_is_type?(block) => true
@example

Returns true if the block given is of the handler's template type; false otherwise.
#
def block_is_type?(block)
  template.block_is_haml?(block)
end

def capture_from_template(*args, &block)


@handler.capture_from_template(&block) => "...html..."
@example

Captures the html from a block of template code for this handler
def capture_from_template(*args, &block)
  eval("_hamlout ||= @haml_buffer", block.binding) # this is for rbx
  template.capture_haml(*args, &block)
end

def concat_to_template(text="")


@handler.concat_to_template("This will be output to the template buffer")
@example

Outputs the given text to the templates buffer directly
#
def concat_to_template(text="")
  template.haml_concat(text)
  nil
end

def engines


@handler.engines => [:haml]
@example

Returns an array of engines used for the template
#
def engines
  @_engines ||= [:haml]
end

def is_type?


@handler.is_type? => true
@example

Returns true if the current template type is same as this handlers; false otherwise.
#
def is_type?
  template.respond_to?(:is_haml?) && template.is_haml?
end