Exception: Openphar::Errors::ValidationError
- Inherits:
-
Openphar::Error
- Object
- StandardError
- Openphar::Error
- Openphar::Errors::ValidationError
- Defined in:
- lib/openphar/errors/validation_error.rb
Overview
Raised when validation fails.
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(errors = []) ⇒ ValidationError
constructor
A new instance of ValidationError.
Constructor Details
#initialize(errors = []) ⇒ ValidationError
Returns a new instance of ValidationError.
9 10 11 12 |
# File 'lib/openphar/errors/validation_error.rb', line 9 def initialize(errors = []) @errors = errors super("Validation failed: #{errors.join(', ')}") end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
7 8 9 |
# File 'lib/openphar/errors/validation_error.rb', line 7 def errors @errors end |