Sha256: 469131200d12fb7ef3efd93c363331eaffc83bbb0e5aa15305adb5d121caa094
Contents?: true
Size: 382 Bytes
Versions: 14
Compression:
Stored size: 382 Bytes
Contents
module Posgra::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
Version data entries
14 entries across 14 versions & 1 rubygems