Sha256: a838a3d39534bdb8c6e8893d67bb6524645be7c7a2d03ed92da22b140ed3004f
Contents?: true
Size: 509 Bytes
Versions: 32
Compression:
Stored size: 509 Bytes
Contents
# encoding: utf-8 module Mongoid module Matchers # Performs not in checking. class Nin < Default # Return true if the attribute is not in the value list. # # @example Do the values match? # matcher.matches?({ :key => 10 }) # # @param [ Hash ] value The values to check. # # @return [ true, false ] If a value exists. def matches?(value) Array.wrap(@attribute).none? { |e| value.values.first.include?(e) } end end end end
Version data entries
32 entries across 32 versions & 2 rubygems