Module: Mongoid::Extensions::Float
- Defined in:
- lib/mongoid/extensions/float.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#__mongoize_time__ ⇒ Time | ActiveSupport::TimeWithZone
Converts the float into a time as the number of seconds since the epoch.
-
#numeric? ⇒ true
Is the float a number?.
Instance Method Details
#__mongoize_time__ ⇒ Time | ActiveSupport::TimeWithZone
Converts the float into a time as the number of seconds since the epoch.
13 14 15 |
# File 'lib/mongoid/extensions/float.rb', line 13 def __mongoize_time__ ::Time.configured.at(self) end |
#numeric? ⇒ true
Is the float a number?
23 24 25 |
# File 'lib/mongoid/extensions/float.rb', line 23 def numeric? true end |