Class: Corn::Rack::SlowRequestProfiler

Inherits:
Object
  • Object
show all
Defined in:
lib/corn/rack/slow_request_profiler.rb

Defined Under Namespace

Classes: ProfilingApp

Instance Method Summary collapse

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

#terminateObject



48
49
50
# File 'lib/corn/rack/slow_request_profiler.rb', line 48

def terminate
  @app.terminate if @app.respond_to?(:terminate)
end