Class: QueueBus::Middleware::Abstract
- Inherits:
-
Object
- Object
- QueueBus::Middleware::Abstract
- Defined in:
- lib/queue_bus/middleware.rb
Overview
A base class for implementing a middleware. Inheriting from this will provide a constructor and a basic call method. Override the call method to implement your own logic. Calling the instance variable ‘@app` will drive the middleware stack.
Instance Method Summary collapse
- #call(_args) ⇒ Object
-
#initialize(app) ⇒ Abstract
constructor
A new instance of Abstract.
Constructor Details
#initialize(app) ⇒ Abstract
Returns a new instance of Abstract.
10 11 12 |
# File 'lib/queue_bus/middleware.rb', line 10 def initialize(app) @app = app end |
Instance Method Details
#call(_args) ⇒ Object
14 15 16 |
# File 'lib/queue_bus/middleware.rb', line 14 def call(_args) @app.call end |