Module: OpenapiFirst::UseRouter
- Included in:
- RequestValidation, ResponseValidation
- Defined in:
- lib/openapi_first/use_router.rb
Instance Method Summary collapse
Instance Method Details
#call(env) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/openapi_first/use_router.rb', line 11 def call(env) return super if env.key?(OPERATION) @router ||= Router.new(->(e) { super(e) }, @options) @router.call(env) end |
#initialize(app, options = {}) ⇒ Object
5 6 7 8 9 |
# File 'lib/openapi_first/use_router.rb', line 5 def initialize(app, = {}) @app = app @options = super end |