方法
類別公開方法
new(app, executor) 連結
來源:顯示 | 在 GitHub 上
# File actionpack/lib/action_dispatch/middleware/executor.rb, line 7 def initialize(app, executor) @app, @executor = app, executor end
執行個體公開方法
call(env) 連結
來源:顯示 | 在 GitHub 上
# File actionpack/lib/action_dispatch/middleware/executor.rb, line 11 def call(env) state = @executor.run!(reset: true) begin response = @app.call(env) returned = response << ::Rack::BodyProxy.new(response.pop) { state.complete! } rescue => error @executor.error_reporter.report(error, handled: false, source: "application.action_dispatch") raise ensure state.complete! unless returned end end