Exception: ScopedId::ReadonlyAttributeError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/scoped_id/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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, message = nil)
  @attribute = attr_name
  message ||= "#{attr_name} is readonly."
  super(message)
end

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



4
5
6
# File 'lib/scoped_id/errors.rb', line 4

def attribute
  @attribute
end