Defines a method for calling a specific HAML template.
path | Path to the template file. |
name<~to_s> | The name of the template method. |
locals | A list of locals to assign from the args passed into the compiled template. |
mod | The class or module wherein this method should be defined. |
# File lib/merb-haml/template.rb, line 13 13: def self.compile_template(io, name, locals, mod) 14: path = File.expand_path(io.path) 15: config = (Merb::Plugins.config[:haml] || {}).inject({}) do |c, (k, v)| 16: c[k.to_sym] = v 17: c 18: end.merge :filename => path 19: template = ::Haml::Engine.new(io.read, config) 20: template.def_method(mod, name, *locals) 21: name 22: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.