Exception: Altair::ValidationError
- Inherits:
-
StandardError
- Object
- StandardError
- Altair::ValidationError
- Defined in:
- lib/altair/validation_error.rb
Instance Attribute Summary collapse
-
#validator ⇒ Object
readonly
Returns the value of attribute validator.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(validator, value) ⇒ ValidationError
constructor
A new instance of ValidationError.
- #message ⇒ Object
Constructor Details
#initialize(validator, value) ⇒ ValidationError
Returns a new instance of ValidationError.
5 6 7 8 |
# File 'lib/altair/validation_error.rb', line 5 def initialize(validator, value) @validator = validator @value = value end |
Instance Attribute Details
#validator ⇒ Object (readonly)
Returns the value of attribute validator.
3 4 5 |
# File 'lib/altair/validation_error.rb', line 3 def validator @validator end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
3 4 5 |
# File 'lib/altair/validation_error.rb', line 3 def value @value end |
Instance Method Details
#message ⇒ Object
10 11 12 |
# File 'lib/altair/validation_error.rb', line 10 def "Validator :#{validator} failed against `#{value}` (of class #{value.class})" end |