Method: Linecook::Recipe#render
- Defined in:
- lib/linecook/recipe.rb
#render(template_name, locals = attrs) ⇒ Object
Looks up a template in cookbook and renders it.
255 256 257 258 |
# File 'lib/linecook/recipe.rb', line 255 def render(template_name, locals=attrs) file = _cookbook_.find(:templates, template_name, ['.erb']) Tilt.new(file).render(Object.new, locals) end |