Exception: Holotype::Attribute::ReadOnlyError
- Inherits:
-
StandardError
- Object
- StandardError
- Holotype::Attribute::ReadOnlyError
- Defined in:
- lib/holotype/attribute/read_only_error.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ ReadOnlyError
constructor
A new instance of ReadOnlyError.
- #message ⇒ Object
Constructor Details
#initialize(name) ⇒ ReadOnlyError
Returns a new instance of ReadOnlyError.
6 7 8 |
# File 'lib/holotype/attribute/read_only_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/read_only_error.rb', line 4 def name @name end |
Instance Method Details
#message ⇒ Object
10 11 12 |
# File 'lib/holotype/attribute/read_only_error.rb', line 10 def "Cannot modify read-only attribute `#{name}`".freeze end |