Sha256: 6b915ffa99f44fa36dfea66c66a2e911682133fddd6dc5968f91da9b094e1c29
Contents?: true
Size: 582 Bytes
Versions: 39
Compression:
Stored size: 582 Bytes
Contents
module Mongoid module Matcher # @api private module All module_function def matches?(exists, value, condition) unless Array === condition raise Errors::InvalidQuery, "$all argument must be an array: #{Errors::InvalidQuery.truncate_expr(condition)}" end !condition.empty? && condition.all? do |c| case c when ::Regexp, BSON::Regexp::Raw Regex.matches_array_or_scalar?(value, c) else EqImpl.matches?(true, value, c, '$all') end end end end end end
Version data entries
39 entries across 39 versions & 1 rubygems