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