Module: Mongoid::Extensions::Integer
- Defined in:
- lib/mongoid/extensions/integer.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#__mongoize_time__ ⇒ Time | ActiveSupport::TimeWithZone
Converts the integer into a time as the number of seconds since the epoch.
-
#numeric? ⇒ true
Is the integer a number?.
-
#unconvertable_to_bson? ⇒ true
Is the object not to be converted to bson on criteria creation?.
Instance Method Details
#__mongoize_time__ ⇒ Time | ActiveSupport::TimeWithZone
Converts the integer into a time as the number of seconds since the epoch.
16 17 18 |
# File 'lib/mongoid/extensions/integer.rb', line 16 def __mongoize_time__ ::Time.configured.at(self) end |
#numeric? ⇒ true
Is the integer a number?
28 29 30 |
# File 'lib/mongoid/extensions/integer.rb', line 28 def numeric? true end |
#unconvertable_to_bson? ⇒ true
Is the object not to be converted to bson on criteria creation?
40 41 42 |
# File 'lib/mongoid/extensions/integer.rb', line 40 def unconvertable_to_bson? true end |