Parent

Methods

Haml::Engine

Public Instance Methods

def_method(object, name, *local_names) click to toggle source

Parameters

object<Class, Module>

The class or module wherein this method should be defined.

name<~to_s>

The name of the template method.

*local_names

Local names to define in the HAML template.

# File lib/merb-haml/template.rb, line 47
def def_method(object, name, *local_names)
  method = object.is_a?(Module) ? :module_eval : :instance_eval

  setup = "@_engine = 'haml'"

  object.send(method, "def #{name}(_haml_locals = {}); #{setup}; #{precompiled_with_ambles(local_names)}; end",
              @options[:filename], 0)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.