module Mongoid::Extensions::Float

Public Instance Methods

__mongoize_time__() click to toggle source

Convert the float into a time.

@example Convert the float into a time.

1335532685.117847.__mongoize_time__

@return [ Time ] The float as a time.

@since 3.0.0

# File lib/mongoid/extensions/float.rb, line 14
def __mongoize_time__
  ::Time.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 26
def numeric?
  true
end