Class: Corn::Rack::SlowRequestProfiler
- Inherits:
-
Object
- Object
- Corn::Rack::SlowRequestProfiler
- Defined in:
- lib/corn/rack/slow_request_profiler.rb
Defined Under Namespace
Classes: ProfilingApp
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, *args) ⇒ SlowRequestProfiler
constructor
A new instance of SlowRequestProfiler.
- #terminate ⇒ Object
Constructor Details
#initialize(app, *args) ⇒ SlowRequestProfiler
Returns a new instance of SlowRequestProfiler.
37 38 39 |
# File 'lib/corn/rack/slow_request_profiler.rb', line 37 def initialize(app, *args) @app = Corn.configured? ? ProfilingApp.new(app, *args) : app end |
Instance Method Details
#call(env) ⇒ Object
41 42 43 |
# File 'lib/corn/rack/slow_request_profiler.rb', line 41 def call(env) @app.call(env) end |
#terminate ⇒ Object
45 46 47 |
# File 'lib/corn/rack/slow_request_profiler.rb', line 45 def terminate @app.terminate if @app.respond_to?(:terminate) end |