class Haml::Plugin

This module makes Haml work with Rails using the template handler API.

def self.call(template)

In Rails 3.1+, #call takes the place of #compile
def self.call(template)
  new.compile(template)
end

def cache_fragment(block, name = {}, options = nil)

def cache_fragment(block, name = {}, options = nil)
  @view.fragment_for(block, name, options) do
    eval("_hamlout.buffer", block.binding)
  end
end

def compile(template)

def compile(template)
  options = Haml::Template.options.dup
  options[:mime_type] = template.mime_type if template.respond_to? :mime_type
  options[:filename] = template.identifier
  Haml::Engine.new(template.source, options).send(:precompiled_with_ambles, [])
end

def handles_encoding?; true; end

def handles_encoding?; true; end