Class: Mongoid::Enum::InvalidValue

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_valueObject (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