Class: Croods::Middleware::Base
- Inherits:
-
Object
- Object
- Croods::Middleware::Base
- Defined in:
- lib/croods/middleware/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, **options) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(app, **options) ⇒ Base
Returns a new instance of Base.
8 9 10 11 |
# File 'lib/croods/middleware/base.rb', line 8 def initialize(app, **) self.app = app self. = end |
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app.
6 7 8 |
# File 'lib/croods/middleware/base.rb', line 6 def app @app end |
#options ⇒ Object
Returns the value of attribute options.
6 7 8 |
# File 'lib/croods/middleware/base.rb', line 6 def @options end |
Instance Method Details
#call(env) ⇒ Object
13 14 15 16 17 |
# File 'lib/croods/middleware/base.rb', line 13 def call(env) committee = self.class.name.gsub('Croods', 'Committee').constantize .new(app, .merge(schema: Croods.json_schema)) committee.call(env) end |