Exception: ActiveEntity::AttributeAssignmentError
- Inherits:
-
ActiveEntityError
- Object
- StandardError
- ActiveEntityError
- ActiveEntity::AttributeAssignmentError
- Defined in:
- lib/active_entity/errors.rb
Overview
Raised when an error occurred while doing a mass assignment to an attribute through the ActiveEntity::Base#attributes= method. The exception has an attribute
property that is the name of the offending attribute.
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
Instance Method Summary collapse
-
#initialize(message = nil, exception = nil, attribute = nil) ⇒ AttributeAssignmentError
constructor
A new instance of AttributeAssignmentError.
Constructor Details
#initialize(message = nil, exception = nil, attribute = nil) ⇒ AttributeAssignmentError
Returns a new instance of AttributeAssignmentError.
51 52 53 54 55 |
# File 'lib/active_entity/errors.rb', line 51 def initialize( = nil, exception = nil, attribute = nil) super() @exception = exception @attribute = attribute end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
49 50 51 |
# File 'lib/active_entity/errors.rb', line 49 def attribute @attribute end |
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
49 50 51 |
# File 'lib/active_entity/errors.rb', line 49 def exception @exception end |