Module: Origin::Extensions::Range::ClassMethods
- Defined in:
- lib/origin/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.
56 57 58 59 |
# File 'lib/origin/extensions/range.rb', line 56 def evolve(object) return object unless object.is_a?(::Range) { "$gte" => object.min, "$lte" => object.max } end |