Exception: ApiRecord::RecordInvalidError
- Inherits:
-
StandardError
- Object
- StandardError
- ApiRecord::RecordInvalidError
- Defined in:
- lib/api_record/errors.rb
Instance Attribute Summary collapse
-
#record ⇒ Object
readonly
Returns the value of attribute record.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(record, response = nil) ⇒ RecordInvalidError
constructor
A new instance of RecordInvalidError.
Constructor Details
#initialize(record, response = nil) ⇒ RecordInvalidError
7 8 9 10 11 12 |
# File 'lib/api_record/errors.rb', line 7 def initialize(record, response = nil) @record = record @response = response = "Validation failed: #{record.errors..join(', ')}" super() end |
Instance Attribute Details
#record ⇒ Object (readonly)
Returns the value of attribute record.
5 6 7 |
# File 'lib/api_record/errors.rb', line 5 def record @record end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
5 6 7 |
# File 'lib/api_record/errors.rb', line 5 def response @response end |