Class Haml::Engine
In: merb-haml/lib/merb-haml/template.rb
Parent: Object

Methods

Public Instance methods

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.

[Source]

    # File merb-haml/lib/merb-haml/template.rb, line 47
47:     def def_method(object, name, *local_names)
48:       method = object.is_a?(Module) ? :module_eval : :instance_eval
49: 
50:       setup = "@_engine = 'haml'"
51: 
52:       object.send(method, "def #{name}(_haml_locals = {}); #{setup}; #{precompiled_with_ambles(local_names)}; end",
53:                   @options[:filename], 0)
54:     end

[Validate]