Exception: SmartEnum::RegistrationError

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

Direct Known Subclasses

DuplicateIDError, MissingIDError

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attributesObject (readonly)

Returns the value of attribute attributes.



180
181
182
# File 'lib/smart_enum.rb', line 180

def attributes
  @attributes
end

#typeObject (readonly)

Returns the value of attribute type.



180
181
182
# File 'lib/smart_enum.rb', line 180

def type
  @type
end