Sha256: 26d227e0a4b01f0c9c37d946de9b73e10d8d13cbdc984bddfa18827e0e4dcef4
Contents?: true
Size: 644 Bytes
Versions: 43
Compression:
Stored size: 644 Bytes
Contents
module Mongoid module Matcher # @api private module In module_function def matches?(exists, value, condition) unless Array === condition raise Errors::InvalidQuery, "$in argument must be an array: #{Errors::InvalidQuery.truncate_expr(condition)}" end if Array === value if value.any? { |v| condition.any? do |c| EqImplWithRegexp.matches?('$in', v, c) end } then return true end end condition.any? do |c| EqImplWithRegexp.matches?('$in', value, c) end end end end end
Version data entries
43 entries across 43 versions & 1 rubygems