Exception: HCast::Errors::ValidationError
- Inherits:
-
StandardError
- Object
- StandardError
- HCast::Errors::ValidationError
- Defined in:
- lib/hcast/errors.rb
Overview
Raised when hash has validation errors
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(message, errors) ⇒ ValidationError
constructor
A new instance of ValidationError.
- #message ⇒ Object
- #short_message ⇒ Object
Constructor Details
#initialize(message, errors) ⇒ ValidationError
Returns a new instance of ValidationError.
54 55 56 57 |
# File 'lib/hcast/errors.rb', line 54 def initialize(, errors) @errors = errors super() end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
52 53 54 |
# File 'lib/hcast/errors.rb', line 52 def errors @errors end |
Instance Method Details
#message ⇒ Object
59 60 61 |
# File 'lib/hcast/errors.rb', line 59 def "#{@message}\n#{errors.to_hash}" end |
#short_message ⇒ Object
63 64 65 |
# File 'lib/hcast/errors.rb', line 63 def 'Validation error' end |