Class: AppProfiler::Viewer::BaseMiddleware
- Inherits:
-
Object
- Object
- AppProfiler::Viewer::BaseMiddleware
show all
- Defined in:
- lib/app_profiler/viewer/base_middleware.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
64
65
66
|
# File 'lib/app_profiler/viewer/base_middleware.rb', line 64
def initialize(app)
@app = app
end
|
Class Method Details
.id(file) ⇒ Object
59
60
61
|
# File 'lib/app_profiler/viewer/base_middleware.rb', line 59
def id(file)
file.basename.to_s
end
|
Instance Method Details
#call(env) ⇒ Object
68
69
70
71
72
73
74
|
# File 'lib/app_profiler/viewer/base_middleware.rb', line 68
def call(env)
request = Rack::Request.new(env)
return index(env) if %r(\A/app_profiler/?\z).match?(request.path_info)
@app.call(env)
end
|