lib/brochure/template.rb in brochure-0.4.0 vs lib/brochure/template.rb in brochure-0.5.0

- old
+ new

@@ -6,11 +6,11 @@ @app = app @path = path end def template - @template ||= Tilt.new(path) + @template ||= Tilt.new(path, nil, :outvar => '@_out_buf') end def engine_extension @engine_extension ||= File.extname(path) end @@ -27,10 +27,10 @@ type = Rack::Mime.mime_type(format_extension) type[/^text/] ? "#{type}; charset=utf-8" : type end end - def render(env, locals = {}) - template.render(app.context_for(self, env), locals) + def render(env, locals = {}, &block) + template.render(app.context_for(self, env), locals, &block) end end end