Class: Papermill::Collector
- Inherits:
-
Object
- Object
- Papermill::Collector
- Defined in:
- lib/papermill-agent/rack/collector.rb
Overview
The Collector class is the middleware component of papermill. To use it with a rails app, you must add the following to your environment.rb file:
config.middleware.use Papermill::Collector
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Collector
constructor
A new instance of Collector.
Constructor Details
#initialize(app) ⇒ Collector
Returns a new instance of Collector.
10 11 12 |
# File 'lib/papermill-agent/rack/collector.rb', line 10 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
14 15 16 17 18 |
# File 'lib/papermill-agent/rack/collector.rb', line 14 def call(env) status, headers, response = @app.call(env) ResponseParser.parse(status, headers, response, env) [status, headers, response] end |