Exception: Judopay::ValidationError
- Inherits:
-
StandardError
- Object
- StandardError
- Judopay::ValidationError
- Defined in:
- lib/judopay/error.rb
Overview
A validation error that hasn’t reached the API
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#message ⇒ Object
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(message, errors = nil) ⇒ ValidationError
constructor
A new instance of ValidationError.
- #model_errors ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(message, errors = nil) ⇒ ValidationError
Returns a new instance of ValidationError.
91 92 93 94 95 |
# File 'lib/judopay/error.rb', line 91 def initialize(, errors = nil) @errors = errors @message = @message += model_errors_summary unless @errors.nil? end |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
89 90 91 |
# File 'lib/judopay/error.rb', line 89 def errors @errors end |
#message ⇒ Object
Returns the value of attribute message.
89 90 91 |
# File 'lib/judopay/error.rb', line 89 def @message end |
Instance Method Details
#model_errors ⇒ Object
101 102 103 104 |
# File 'lib/judopay/error.rb', line 101 def model_errors return if @errors.nil? @errors. end |
#to_s ⇒ Object
97 98 99 |
# File 'lib/judopay/error.rb', line 97 def to_s @message end |