Class: Integer

Inherits:
Object
  • Object
show all
Defined in:
lib/mongo_odm/core_ext/conversions.rb

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Object) type_cast(value)



101
102
103
104
# File 'lib/mongo_odm/core_ext/conversions.rb', line 101

def self.type_cast(value)
  return nil if value.nil?
  value.to_i
end

Instance Method Details

- (Object) to_mongo



106
107
108
# File 'lib/mongo_odm/core_ext/conversions.rb', line 106

def to_mongo
  self
end