Sha256: bd33fe56ff988d7aa6e854d4439e52a88d1c8b2d4c806dc35287a12e228b43c2

Contents?: true

Size: 321 Bytes

Versions: 62

Compression:

Stored size: 321 Bytes

Contents

module ExpressTemplates
  module Renderer
    # render accepts source or block, evaluates the resulting string of ruby in the context provided
    def render context=nil, template_or_src=nil, &block
      compiled_template = compile(template_or_src, &block)
      context.instance_eval compiled_template
    end
  end
end

Version data entries

62 entries across 62 versions & 2 rubygems

Version Path
express_admin-1.4.0 vendor/gems/express_templates/lib/express_templates/renderer.rb
express_templates-0.8.0 lib/express_templates/renderer.rb