Class: Rack::Stackflame

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

Instance Method Summary collapse

Constructor Details

#initialize(app, options = {}) ⇒ Stackflame

Returns a new instance of Stackflame.



3
4
5
6
# File 'lib/rack/stackflame.rb', line 3

def initialize(app, options = {})
  @app = app
  @options = options
end

Instance Method Details

#call(env) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/rack/stackflame.rb', line 8

def call(env)
  result = nil
  ::Stackflame.profile(@options) do
    result = @app.call(env)
  end
  result
end