class Mongoid::Matchable::Size

Performs size checking.

def matches?(value)

Returns:
  • (true, false) - If a value exists.

Parameters:
  • value (Hash) -- The values to check.

Other tags:
    Example: Do the values match? -
def matches?(value)
  @attribute.size == value.values.first
end