Exception: MultiparameterAttributesHandler::AttributeAssignmentError
- Inherits:
-
MultiparameterAttributesHandlerError
- Object
- StandardError
- MultiparameterAttributesHandlerError
- MultiparameterAttributesHandler::AttributeAssignmentError
- Defined in:
- lib/multiparameter_attributes_handler/multiparameter_attributes_handler_error.rb
Overview
Raised when an error occurred while doing a mass assignment to an attribute through the attributes=
method. The exception has an attribute_name
property that is the name of the offending attribute.
Instance Attribute Summary collapse
-
#attribute_name ⇒ Object
readonly
Returns the value of attribute attribute_name.
-
#exception_raised ⇒ Object
readonly
Returns the value of attribute exception_raised.
Instance Method Summary collapse
-
#initialize(exception_raised, attribute_name) ⇒ AttributeAssignmentError
constructor
A new instance of AttributeAssignmentError.
Constructor Details
#initialize(exception_raised, attribute_name) ⇒ AttributeAssignmentError
Returns a new instance of AttributeAssignmentError.
13 14 15 16 |
# File 'lib/multiparameter_attributes_handler/multiparameter_attributes_handler_error.rb', line 13 def initialize(exception_raised, attribute_name) @exception_raised = exception_raised @attribute_name = attribute_name end |
Instance Attribute Details
#attribute_name ⇒ Object (readonly)
Returns the value of attribute attribute_name.
12 13 14 |
# File 'lib/multiparameter_attributes_handler/multiparameter_attributes_handler_error.rb', line 12 def attribute_name @attribute_name end |
#exception_raised ⇒ Object (readonly)
Returns the value of attribute exception_raised.
12 13 14 |
# File 'lib/multiparameter_attributes_handler/multiparameter_attributes_handler_error.rb', line 12 def exception_raised @exception_raised end |