Class: AppProfiler::Middleware

Inherits:
Object
  • Object
show all
Defined in:
lib/app_profiler/middleware.rb,
lib/app_profiler/middleware/base_action.rb,
lib/app_profiler/middleware/view_action.rb,
lib/app_profiler/middleware/upload_action.rb

Defined Under Namespace

Classes: BaseAction, UploadAction, ViewAction

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Middleware

Returns a new instance of Middleware.



14
15
16
# File 'lib/app_profiler/middleware.rb', line 14

def initialize(app)
  @app = app
end

Instance Method Details

#call(env, params = AppProfiler::RequestParameters.new(Rack::Request.new(env))) ⇒ Object



18
19
20
21
22
# File 'lib/app_profiler/middleware.rb', line 18

def call(env, params = AppProfiler::RequestParameters.new(Rack::Request.new(env)))
  profile(env, params) do
    @app.call(env)
  end
end