mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
simplify capture method
This commit is contained in:
parent
972558e0ad
commit
24cb84e274
1 changed files with 0 additions and 3 deletions
|
@ -88,11 +88,8 @@ module Sinatra
|
|||
capture[:slim] = "== yield(*args)"
|
||||
|
||||
def capture(engine, args, block)
|
||||
@_out_buf, buf_was = nil, @_out_buf
|
||||
eval '_buf.clear if defined? _buf', block.binding
|
||||
render(engine, Sinatra::ContentFor.capture.fetch(engine), {}, :args => args, :block => block, &block)
|
||||
ensure
|
||||
@_out_buf = buf_was
|
||||
end
|
||||
|
||||
def render(engine, *)
|
||||
|
|
Loading…
Reference in a new issue