Class: Mongoid::Enum::InvalidValue
- Inherits:
-
Object
- Object
- Mongoid::Enum::InvalidValue
- Defined in:
- lib/mongoid/enum/invalid_value.rb
Overview
Public: Wraps invalid values loaded from DB before returning them via getter.
Instance Attribute Summary collapse
-
#database_value ⇒ Object
readonly
Public: Holds the value loaded from DB that is not part of defined enum.
Instance Method Summary collapse
-
#initialize(value) ⇒ InvalidValue
constructor
:nodoc:.
Constructor Details
#initialize(value) ⇒ InvalidValue
:nodoc:
9 10 11 |
# File 'lib/mongoid/enum/invalid_value.rb', line 9 def initialize(value) @database_value = value end |
Instance Attribute Details
#database_value ⇒ Object (readonly)
Public: Holds the value loaded from DB that is not part of defined enum.
6 7 8 |
# File 'lib/mongoid/enum/invalid_value.rb', line 6 def database_value @database_value end |