Exception: DuckRecord::MultiparameterAssignmentErrors

Inherits:
DuckRecordError
  • Object
show all
Defined in:
lib/duck_record/errors.rb

Overview

Raised when there are multiple errors while doing a mass assignment through the DuckRecord::Base#attributes= method. The exception has an errors property that contains an array of AttributeAssignmentError objects, each corresponding to the error while assigning to an attribute.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors = nil) ⇒ MultiparameterAssignmentErrors

Returns a new instance of MultiparameterAssignmentErrors.



67
68
69
# File 'lib/duck_record/errors.rb', line 67

def initialize(errors = nil)
  @errors = errors
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



65
66
67
# File 'lib/duck_record/errors.rb', line 65

def errors
  @errors
end