lib/sdoc/templatable.rb in sdoc-2.2.0 vs lib/sdoc/templatable.rb in sdoc-2.3.0
- old
+ new
@@ -26,10 +26,10 @@
### Load and render the erb template with the given +template_name+ within
### current context. Adds all +local_assigns+ to context
def include_template(template_name, local_assigns = {})
source = local_assigns.keys.map { |key| "#{key} = local_assigns[:#{key}];" }.join
- templatefile = @template_dir + template_name
+ templatefile = templatefile = @template_dir + template_name
eval("#{source};eval_template(templatefile, binding)")
end
### Load and render the erb template in the given +templatefile+ within the
### specified +context+ (a Binding object) and write it out to +outfile+.