AbstractHandler
Handler for reading and writing from a haml template.
Returns true if the block given is of the handler’s template type; false otherwise.
@example
@handler.block_is_type?(block) => true
# File lib/padrino-helpers/output_helpers/haml_handler.rb, line 24 def block_is_type?(block) template.block_is_haml?(block) end
Captures the html from a block of template code for this handler
@example
@handler.capture_from_template(&block) => "...html..."
# File lib/padrino-helpers/output_helpers/haml_handler.rb, line 33 def capture_from_template(*args, &block) eval("_hamlout ||= @haml_buffer", block.binding) # this is for rbx template.capture_haml(*args, &block) end
Outputs the given text to the templates buffer directly
@example
@handler.concat_to_template("This will be output to the template buffer")
# File lib/padrino-helpers/output_helpers/haml_handler.rb, line 44 def concat_to_template(text="") template.haml_concat(text) nil end
Generated with the Darkfish Rdoc Generator 2.