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
40 41 42 |
# File 'lib/corn/rack/slow_request_profiler.rb', line 40 def initialize(app, *args) @app = Corn.configured? ? ProfilingApp.new(app, *args) : app end |
Instance Method Details
#call(env) ⇒ Object
44 45 46 |
# File 'lib/corn/rack/slow_request_profiler.rb', line 44 def call(env) @app.call(env) end |
#terminate ⇒ Object
48 49 50 |
# File 'lib/corn/rack/slow_request_profiler.rb', line 48 def terminate @app.terminate if @app.respond_to?(:terminate) end |