Module: Mongoid::Criteria::Queryable::Extensions::Range::ClassMethods
- Defined in:
- lib/mongoid/criteria/queryable/extensions/range.rb
Instance Method Summary collapse
-
#evolve(object) ⇒ Hash
Evolve the range.
Instance Method Details
#evolve(object) ⇒ Hash
Evolve the range. This will transform it into a $gte/$lte selection. Endless and beginning-less ranges will use only $gte or $lte respectively. End-excluded ranges (…) will use $lt selector instead of $lte.
91 92 93 94 |
# File 'lib/mongoid/criteria/queryable/extensions/range.rb', line 91 def evolve(object) return object unless object.is_a?(::Range) object.__evolve_range__ end |