Sha256: e71f6fc54762c454841a070fdabe1276543effb9a7ab9773150c49dc01614538
Contents?: true
Size: 580 Bytes
Versions: 27
Compression:
Stored size: 580 Bytes
Contents
# encoding: utf-8 module Mongoid module Matchable # 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) attribute_array = @attribute.nil? ? [nil] : Array.wrap(@attribute) attribute_array.none? { |e| value.values.first.include?(e) } end end end end
Version data entries
27 entries across 27 versions & 2 rubygems