module Mongoid::Extensions::Float

Public Instance Methods

__mongoize_time__() click to toggle source

Converts the float into a time as the number of seconds since the epoch.

@example Convert the float into a time.

1335532685.117847.__mongoize_time__

@return [ Time | ActiveSupport::TimeWithZone ] The time.

@since 3.0.0

# File lib/mongoid/extensions/float.rb, line 16
def __mongoize_time__
  ::Time.configured.at(self)
end
numeric?() click to toggle source

Is the float a number?

@example Is the object a number?.

object.numeric?

@return [ true ] Always true.

@since 3.0.0

# File lib/mongoid/extensions/float.rb, line 28
def numeric?
  true
end