Class: JSON::Validator::ErrorRecorder
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- JSON::Validator::ErrorRecorder
- Defined in:
- lib/json-schema/validator.rb
Instance Method Summary collapse
-
#initialize(sub) ⇒ ErrorRecorder
constructor
A new instance of ErrorRecorder.
- #validation_error(error) ⇒ Object
- #validation_errors ⇒ Object
- #with_errors ⇒ Object
Constructor Details
#initialize(sub) ⇒ ErrorRecorder
Returns a new instance of ErrorRecorder.
113 114 115 116 117 |
# File 'lib/json-schema/validator.rb', line 113 def initialize(sub) @errors = [] super end |
Instance Method Details
#validation_error(error) ⇒ Object
119 120 121 |
# File 'lib/json-schema/validator.rb', line 119 def validation_error(error) @errors.push(error) end |
#validation_errors ⇒ Object
123 124 125 |
# File 'lib/json-schema/validator.rb', line 123 def validation_errors @errors end |
#with_errors ⇒ Object
127 128 129 |
# File 'lib/json-schema/validator.rb', line 127 def with_errors self end |