Module: Lydown::TemplateBinding

Included in:
WorkContext
Defined in:
lib/lydown/templates.rb

Instance Method Summary collapse

Instance Method Details

#template_binding(locals = {}) ⇒ Object

Used to bind to instance when rendering templates



31
32
33
34
35
# File 'lib/lydown/templates.rb', line 31

def template_binding(locals = {})
  b = binding
  locals.each {|k, v| b.local_variable_set(k.to_sym, v)}
  b
end