Class: Committee::Middleware::Base
- Inherits:
-
Object
- Object
- Committee::Middleware::Base
- Defined in:
- lib/committee/middleware/base.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(app, options = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(app, options = {}) ⇒ Base
Returns a new instance of Base.
3 4 5 6 7 8 9 10 |
# File 'lib/committee/middleware/base.rb', line 3 def initialize(app, ={}) @app = app @params_key = [:params_key] || "committee.params" data = [:schema] || raise("need option `schema`") @schema = Committee::Schema.new(data) @router = Committee::Router.new(@schema) end |