Sha256: 4b19a5b6fdea0f7c25dea72faba2c4a3f3959491d19bae48c1a7bf41ebbbde4e
Contents?: true
Size: 509 Bytes
Versions: 17
Compression:
Stored size: 509 Bytes
Contents
# encoding: utf-8 module Mongoid #:nodoc: module Matchers #:nodoc: # Performs matching for any value in an array. class In < Default # Return true if the attribute is in the values. # # @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) value.values.first.include?(@attribute) end end end end
Version data entries
17 entries across 17 versions & 1 rubygems