Class: Insight::RequestRecorder
- Inherits:
-
Object
- Object
- Insight::RequestRecorder
- Defined in:
- lib/insight/request-recorder.rb
Instance Method Summary (collapse)
- - (Object) call(env)
-
- (RequestRecorder) initialize(app)
constructor
A new instance of RequestRecorder.
Constructor Details
- (RequestRecorder) initialize(app)
A new instance of RequestRecorder
6 7 8 9 |
# File 'lib/insight/request-recorder.rb', line 6 def initialize(app) @app = app @request_table = Database::RequestTable.new() end |
Instance Method Details
- (Object) call(env)
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/insight/request-recorder.rb', line 11 def call(env) env["insight.request-id"] = @request_table.store(env["REQUEST_METHOD"], env["PATH_INFO"]) results = @app.call(env) @request_table.sweep return results end |