Sha256: 53f8d2e9843cb472265d6ea1784cf44bc9106ddd617e83ceaf5f73e7ba8746cd
Contents?: true
Size: 520 Bytes
Versions: 13
Compression:
Stored size: 520 Bytes
Contents
# frozen_string_literal: true # encoding: utf-8 module Mongoid module Matchable # Performs size checking. class Size < Default # Return true if the attribute size is equal to the first value. # # @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.size == value.values.first end end end end
Version data entries
13 entries across 13 versions & 2 rubygems