Class: Stackprofiler::Middleware
- Inherits:
-
Object
- Object
- Stackprofiler::Middleware
- Defined in:
- lib/stackprofiler/middleware.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, options = {}) ⇒ Middleware
constructor
A new instance of Middleware.
Constructor Details
#initialize(app, options = {}) ⇒ Middleware
Returns a new instance of Middleware.
3 4 5 6 7 8 9 10 11 |
# File 'lib/stackprofiler/middleware.rb', line 3 def initialize(app, = {}) mid = Rack::Builder.new do use Rack::Deflater run WebUI end @app = Rack::URLMap.new({'/__stackprofiler' => mid, '/' => DataCollector.new(app, )}) @options = end |
Instance Method Details
#call(env) ⇒ Object
13 14 15 |
# File 'lib/stackprofiler/middleware.rb', line 13 def call(env) @app.call env end |