Exception: Rasti::Form::ValidationError
- Inherits:
-
StandardError
- Object
- StandardError
- Rasti::Form::ValidationError
- Defined in:
- lib/rasti/form/errors.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
Instance Method Summary collapse
-
#initialize(scope, errors) ⇒ ValidationError
constructor
A new instance of ValidationError.
- #message ⇒ Object
Constructor Details
#initialize(scope, errors) ⇒ ValidationError
Returns a new instance of ValidationError.
50 51 52 53 |
# File 'lib/rasti/form/errors.rb', line 50 def initialize(scope, errors) @scope = scope @errors = errors end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
48 49 50 |
# File 'lib/rasti/form/errors.rb', line 48 def errors @errors end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
48 49 50 |
# File 'lib/rasti/form/errors.rb', line 48 def scope @scope end |
Instance Method Details
#message ⇒ Object
55 56 57 |
# File 'lib/rasti/form/errors.rb', line 55 def "Validation error: #{scope} #{JSON.dump(errors)}" end |