Exception: SmartEnum::RegistrationError
- Inherits:
-
StandardError
- Object
- StandardError
- SmartEnum::RegistrationError
- Defined in:
- lib/smart_enum.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(info = nil, type: nil, attributes: {}) ⇒ RegistrationError
constructor
A new instance of RegistrationError.
Constructor Details
#initialize(info = nil, type: nil, attributes: {}) ⇒ RegistrationError
Returns a new instance of RegistrationError.
182 183 184 185 186 187 |
# File 'lib/smart_enum.rb', line 182 def initialize(info=nil, type: nil, attributes:{}) @info = info @type = type @attributes = attributes super("Failed to register enum #{@type} with attributes: #{@attributes}. #{@info}") end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
180 181 182 |
# File 'lib/smart_enum.rb', line 180 def attributes @attributes end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
180 181 182 |
# File 'lib/smart_enum.rb', line 180 def type @type end |