Module: Mongoid::Criteria::Queryable::Extensions::DateTime::ClassMethods
Relationships & Source Files | |
Defined in: | lib/mongoid/criteria/queryable/extensions/date_time.rb |
Instance Method Summary
-
#evolve(object) ⇒ Time
Evolve the object to an date.
Instance Method Details
#evolve(object) ⇒ Time
Evolve the object to an date.
# File 'lib/mongoid/criteria/queryable/extensions/date_time.rb', line 37
def evolve(object) res = begin object.try(:__evolve_time__) rescue ArgumentError nil end res.nil? ? object : res end