Exception: Holotype::Attribute::FrozenModificationError
- Inherits:
-
StandardError
- Object
- StandardError
- Holotype::Attribute::FrozenModificationError
- Defined in:
- lib/holotype/attribute/frozen_modification_error.rb
Instance Attribute Summary collapse
-
#attribute_name ⇒ Object
readonly
Returns the value of attribute attribute_name.
Instance Method Summary collapse
-
#initialize(attribute_name) ⇒ FrozenModificationError
constructor
A new instance of FrozenModificationError.
- #message ⇒ Object
Constructor Details
#initialize(attribute_name) ⇒ FrozenModificationError
Returns a new instance of FrozenModificationError.
6 7 8 |
# File 'lib/holotype/attribute/frozen_modification_error.rb', line 6 def initialize attribute_name @attribute_name = attribute_name.freeze end |
Instance Attribute Details
#attribute_name ⇒ Object (readonly)
Returns the value of attribute attribute_name.
4 5 6 |
# File 'lib/holotype/attribute/frozen_modification_error.rb', line 4 def attribute_name @attribute_name end |
Instance Method Details
#message ⇒ Object
10 11 12 |
# File 'lib/holotype/attribute/frozen_modification_error.rb', line 10 def "Cannot modify value of `#{attribute_name}` in frozen object".freeze end |