module ExpressTemplates::Renderer

Public Instance Methods

render(context=nil, template_or_src=nil, &block) click to toggle source

render accepts source or block, evaluates the resulting string of ruby in the context provided

# File lib/express_templates/renderer.rb, line 4
def render context=nil, template_or_src=nil, &block
  compiled_template = compile(template_or_src, &block)
  context.instance_eval compiled_template
end