module MongoidExtended::EpochTime::TimeDemongoize
Convert the object from its mongo friendly ruby type to this type.
@example Demongoize the object.
Time.demongoize(object)
@param [ Time ] object The time from Mongo.
@return [ Integer ] The object as a integer.
@since 3.0.0
Public Instance Methods
demongoize(object)
click to toggle source
Calls superclass method
# File lib/mongoid_extended/epoch_time.rb, line 29 def demongoize(object) result = super result.nil? ? nil : result.to_i end