Sha256: 606d0bb42761425d2e3b54f0e849500c64b47185a5c0f91a433eb71736f10d51
Contents?: true
Size: 420 Bytes
Versions: 27
Compression:
Stored size: 420 Bytes
Contents
module Miam module TemplateHelper def include_template(template_name, context = {}) tmplt = @context.templates[template_name.to_s] unless tmplt raise "Template `#{template_name}` is not defined" end context_orig = @context @context = @context.merge(context) instance_eval(&tmplt) @context = context_orig end def context @context end end end
Version data entries
27 entries across 27 versions & 1 rubygems