Exception: EnumerizeSchema::MissingValuesError
- Inherits:
-
KeyError
- Object
- KeyError
- EnumerizeSchema::MissingValuesError
- Defined in:
- lib/enumerize_schema/errors.rb
Errors collapse
-
#attribute_name ⇒ String
readonly
The name of the enum attribute.
-
#class_name ⇒ String
readonly
The name of the class where the enum is defined.
Errors collapse
-
#initialize(class_name:, attribute_name:) ⇒ MissingValuesError
constructor
A new instance of MissingValuesError.
Constructor Details
#initialize(class_name:, attribute_name:) ⇒ MissingValuesError
Returns a new instance of MissingValuesError.
36 37 38 39 40 41 |
# File 'lib/enumerize_schema/errors.rb', line 36 def initialize(class_name:, attribute_name:) @class_name = class_name @attribute_name = attribute_name super("Enumerized values missing for attribute: #{class_name}##{attribute_name}") end |
Instance Attribute Details
#attribute_name ⇒ String (readonly)
Returns the name of the enum attribute.
32 33 34 |
# File 'lib/enumerize_schema/errors.rb', line 32 def attribute_name @attribute_name end |
#class_name ⇒ String (readonly)
Returns the name of the class where the enum is defined.
29 30 31 |
# File 'lib/enumerize_schema/errors.rb', line 29 def class_name @class_name end |