Module: Mongoid::Matcher::Lt Private
- Defined in:
- lib/mongoid/matcher/lt.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
In-memory matcher for $lt expression.
Class Method Summary collapse
-
.matches?(exists, value, condition) ⇒ true | false, Boolean
private
Returns whether a value satisfies a $lt expression.
Class Method Details
.matches?(exists, value, condition) ⇒ true | false, Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns whether a value satisfies a $lt expression.
21 22 23 24 25 26 27 28 29 |
# File 'lib/mongoid/matcher/lt.rb', line 21 module_function def matches?(exists, value, condition) case condition when Range raise Errors::InvalidQuery, "$lt argument cannot be a Range: #{Errors::InvalidQuery.truncate_expr(condition)}" end FieldOperator.apply_array_field_operator(exists, value, condition) do |v| FieldOperator.apply_comparison_operator(:<, v, condition) end end |