Class: Rack::Timing::End

Inherits:
Base
  • Object
show all
Defined in:
lib/timing/end.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from Notify

#notify, #should_notify?

Constructor Details

This class inherits a constructor from Rack::Timing::Base

Instance Method Details

#call(env) ⇒ Object

This middleware should run as late in the stack as possible.



5
6
7
8
9
10
# File 'lib/timing/end.rb', line 5

def call(env)
  env["RACK_IN_END"] = time_ms
  status, headers, response = @app.call(env)
  env["RACK_OUT_START"] = time_ms
  [status, headers, response]
end