class Haml::Engine

def def_method(object, name, *local_names)

Parameters:
  • local_names (Array) -- The names of the locals that can be passed to the proc
  • name (String, Symbol) -- The name of the method to define
  • object (Object, Module) -- The object on which to define the method
def def_method(object, name, *local_names)
  method = object.is_a?(Module) ? :module_eval : :instance_eval
  object.send(method, "def #{name}(_haml_locals = {}); #{compiler.precompiled_with_ambles(local_names)}; end",
              @options[:filename], @options[:line])
end