Exception: DecisionAgent::InvalidTestDataError
- Defined in:
- lib/decision_agent/errors.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#row_number ⇒ Object
readonly
Returns the value of attribute row_number.
Instance Method Summary collapse
-
#initialize(message = "Invalid test data", row_number: nil, errors: []) ⇒ InvalidTestDataError
constructor
A new instance of InvalidTestDataError.
Constructor Details
#initialize(message = "Invalid test data", row_number: nil, errors: []) ⇒ InvalidTestDataError
Returns a new instance of InvalidTestDataError.
90 91 92 93 94 95 96 97 |
# File 'lib/decision_agent/errors.rb', line 90 def initialize( = "Invalid test data", row_number: nil, errors: []) @row_number = row_number @errors = errors = .dup += " (row #{row_number})" if row_number += ": #{errors.join(', ')}" if errors.any? super() end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
88 89 90 |
# File 'lib/decision_agent/errors.rb', line 88 def errors @errors end |
#row_number ⇒ Object (readonly)
Returns the value of attribute row_number.
88 89 90 |
# File 'lib/decision_agent/errors.rb', line 88 def row_number @row_number end |