Sha256: e8659ccecf8740cb31fc1adbb0a4791d4577004a392a3a70f6b789cd87aa9ba9

Contents?: true

Size: 536 Bytes

Versions: 11

Compression:

Stored size: 536 Bytes

Contents

# encoding: utf-8
module Mongoid
  module Matchable

    # Performs Greater than or equal to matching.
    class Gte < Default

      # Return true if the attribute is greater than or equal to the 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)
        determine(value, :>=)
      rescue ArgumentError
        false
      end
    end
  end
end

Version data entries

11 entries across 10 versions & 2 rubygems

Version Path
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/mongoid-6.1.0/lib/mongoid/matchable/gte.rb
tdiary-5.0.5 vendor/bundle/gems/mongoid-6.1.0/lib/mongoid/matchable/gte.rb
tdiary-5.0.4 vendor/bundle/gems/mongoid-6.1.0/lib/mongoid/matchable/gte.rb
mongoid-6.1.0 lib/mongoid/matchable/gte.rb
mongoid-6.1.0.rc0 lib/mongoid/matchable/gte.rb
mongoid-6.0.3 lib/mongoid/matchable/gte.rb
mongoid-6.0.2 lib/mongoid/matchable/gte.rb
mongoid-6.0.1 lib/mongoid/matchable/gte.rb
mongoid-6.0.0 lib/mongoid/matchable/gte.rb
mongoid-6.0.0.rc0 lib/mongoid/matchable/gte.rb
mongoid-6.0.0.beta lib/mongoid/matchable/gte.rb