Permalink
Browse files

support sinatra outvar

  • Loading branch information...
1 parent 02bd27a commit 3e91716fc39a948cd49e727b399d1f60fda77f5e @minad minad committed Sep 24, 2012
Showing with 2 additions and 1 deletion.
  1. +1 −1 lib/temple/engine.rb
  2. +1 −0 lib/temple/templates/tilt.rb
View
@@ -33,7 +33,7 @@ class Engine
include Mixins::EngineDSL
extend Mixins::EngineDSL
- define_options :file, :streaming
+ define_options :file, :streaming, :buffer
attr_reader :chain
@@ -24,6 +24,7 @@ def prepare
# Overwrite option: No streaming support in Tilt
opts = {}.update(self.class.default_options).update(options).update(:file => eval_file, :streaming => false)
opts.delete(:mime_type)
+ opts[:buffer] ||= opts.delete(:outvar) # Sinatra sets the :outvar option
@src = self.class.compile(data, opts)
end

0 comments on commit 3e91716

Please sign in to comment.