Class: OpenapiContracts::Match
- Inherits:
-
Object
- Object
- OpenapiContracts::Match
- Defined in:
- lib/openapi_contracts/match.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(doc, response, options = {}) ⇒ Match
constructor
A new instance of Match.
- #valid? ⇒ Boolean
Constructor Details
#initialize(doc, response, options = {}) ⇒ Match
Returns a new instance of Match.
5 6 7 8 9 |
# File 'lib/openapi_contracts/match.rb', line 5 def initialize(doc, response, = {}) @doc = doc @response = response @options = end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
3 4 5 |
# File 'lib/openapi_contracts/match.rb', line 3 def errors @errors end |
Instance Method Details
#valid? ⇒ Boolean
11 12 13 14 15 16 |
# File 'lib/openapi_contracts/match.rb', line 11 def valid? return @errors.empty? if instance_variable_defined?(:@errors) @errors = matchers.call @errors.empty? end |