Class: OpenapiContracts::Validators::Base
- Inherits:
-
Object
- Object
- OpenapiContracts::Validators::Base
show all
- Includes:
- Helper
- Defined in:
- lib/openapi_contracts/validators/base.rb
Instance Method Summary
collapse
Methods included from Helper
#http_status_desc
Constructor Details
#initialize(stack, env) ⇒ Base
8
9
10
11
12
|
# File 'lib/openapi_contracts/validators/base.rb', line 8
def initialize(stack, env)
@stack = stack
@env = env
@errors = []
end
|
Instance Method Details
#call(errors = []) ⇒ Object
14
15
16
17
18
19
20
21
|
# File 'lib/openapi_contracts/validators/base.rb', line 14
def call(errors = [])
validate
errors.push(*@errors)
return errors if @errors.any? && final?
@stack.call(errors)
end
|