Module: Mongoid::Extensions::Time
- Defined in:
- build/mongoid-8.1/lib/mongoid/extensions/time.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#__mongoize_time__ ⇒ Time
Mongoizes a Time into a time.
-
#mongoize ⇒ Time | nil
Turn the object from the ruby type we deal with to a Mongo friendly type.
Instance Method Details
#__mongoize_time__ ⇒ Time
Mongoizes a Time into a time.
Time always mongoize into Time instances (which are themselves).
13 14 15 |
# File 'build/mongoid-8.1/lib/mongoid/extensions/time.rb', line 13 def __mongoize_time__ self end |
#mongoize ⇒ Time | nil
Turn the object from the ruby type we deal with to a Mongo friendly type.
24 25 26 |
# File 'build/mongoid-8.1/lib/mongoid/extensions/time.rb', line 24 def mongoize ::Time.mongoize(self) end |