module Haml::Helpers
def init_haml_helpers
context.haml_tag :p, "Stuff"
context.init_haml_helpers
end
include Haml::Helpers
class << context
context = Object.new
For example:
other than the normal setup with ActionView.
This is useful if you want to use the helpers in a context
as a normal ActionView instance using Haml.
Initializes the current object as though it were in the same context
normally in Rails.
Note: this does **not** need to be called when using Haml helpers
def init_haml_helpers @haml_buffer = Haml::Buffer.new(@haml_buffer, Haml::Engine.new('').send(:options_for_buffer)) nil end