Exception: ScopedId::ReadonlyAttributeError
- Inherits:
-
StandardError
- Object
- StandardError
- ScopedId::ReadonlyAttributeError
- Defined in:
- lib/scoped_id/errors.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
Instance Method Summary collapse
-
#initialize(attr_name, message = nil) ⇒ ReadonlyAttributeError
constructor
A new instance of ReadonlyAttributeError.
Constructor Details
#initialize(attr_name, message = nil) ⇒ ReadonlyAttributeError
Returns a new instance of ReadonlyAttributeError.
6 7 8 9 10 |
# File 'lib/scoped_id/errors.rb', line 6 def initialize(attr_name, = nil) @attribute = attr_name ||= "#{attr_name} is readonly." super() end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
4 5 6 |
# File 'lib/scoped_id/errors.rb', line 4 def attribute @attribute end |