Class: Rollday::Middleware
- Inherits:
-
Faraday::Middleware
- Object
- Faraday::Middleware
- Rollday::Middleware
- Includes:
- RollbarHelper
- Defined in:
- lib/rollday/middleware.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Middleware
constructor
A new instance of Middleware.
Methods included from RollbarHelper
#rollbar_level, #rollbar_message, #rollbar_scope
Constructor Details
#initialize(app) ⇒ Middleware
Returns a new instance of Middleware.
10 11 12 13 14 |
# File 'lib/rollday/middleware.rb', line 10 def initialize(app, **) super(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/rollday/middleware.rb', line 16 def call(env) result = @app.(env) if (result.status) (result) end result end |