Sha256: 8dcc18407b319f2c31026a40a88e016777fbf01b0466229dcad24d285067f4e5
Contents?: true
Size: 487 Bytes
Versions: 46
Compression:
Stored size: 487 Bytes
Contents
# 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
46 entries across 42 versions & 6 rubygems