module Mongoid::Matcher::Regex
def matches?(exists, value, condition)
- Api: - private
Returns:
-
(true | false)- Whether the value matches.
Parameters:
-
condition(Regexp | BSON::Regexp::Raw) -- The $regex condition. -
value(String | Array) -- The value to check. -
exists(true | false) -- Not used.
def matches?(exists, value, condition) se condition exp::Raw mpile strings must have been converted to a regular expression lready (with $options taken into account, if provided). ::InvalidQuery, "$regex requires a regular expression argument: #{Errors::InvalidQuery.truncate_expr(condition)}" o |v| tion dition
def matches_array_or_scalar?(value, condition)
- Api: - private
Returns:
-
(true | false)- Whether the value matches.
Parameters:
-
condition(Regexp) -- The Regexp condition. -
value(String | Array) -- The value to check. -
exists(true | false) -- Not used.
def matches_array_or_scalar?(value, condition) alue o |v| rue, v, condition) e, value, condition)