Exception: SmartEnum::DuplicateIDError
- Inherits:
-
RegistrationError
- Object
- StandardError
- RegistrationError
- SmartEnum::DuplicateIDError
- Defined in:
- lib/smart_enum.rb
Instance Attribute Summary collapse
-
#existing ⇒ Object
readonly
Returns the value of attribute existing.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Attributes inherited from RegistrationError
Instance Method Summary collapse
-
#initialize(type:, id:, attributes:, existing:) ⇒ DuplicateIDError
constructor
A new instance of DuplicateIDError.
Constructor Details
#initialize(type:, id:, attributes:, existing:) ⇒ DuplicateIDError
Returns a new instance of DuplicateIDError.
196 197 198 199 200 |
# File 'lib/smart_enum.rb', line 196 def initialize(type:,id:,attributes:,existing:) @id = id @existing = existing super("The ID #{@id} has already been registered with #{existing}", type: type, attributes: attributes) end |
Instance Attribute Details
#existing ⇒ Object (readonly)
Returns the value of attribute existing.
194 195 196 |
# File 'lib/smart_enum.rb', line 194 def existing @existing end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
194 195 196 |
# File 'lib/smart_enum.rb', line 194 def id @id end |