Class: BN::Middleware::Base
- Inherits:
-
Object
- Object
- BN::Middleware::Base
- Defined in:
- lib/bn/middleware/base.rb
Overview
The base class for middleware.
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
-
#execute(_value) ⇒ Object
Execute the middleware.
-
#initialize(options = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(options = {}) ⇒ Base
Returns a new instance of Base.
11 12 13 |
# File 'lib/bn/middleware/base.rb', line 11 def initialize(={}) @options = .to_h end |
Class Method Details
.execute(data, options = {}) ⇒ Object
6 7 8 |
# File 'lib/bn/middleware/base.rb', line 6 def execute(data, ={}) new().execute(data) end |
Instance Method Details
#execute(_value) ⇒ Object
Execute the middleware.
16 17 18 |
# File 'lib/bn/middleware/base.rb', line 16 def execute(_value) raise NotImplementedError end |