Sha256: c27393fe2af0407f41f8a96b09d532e8fa1e0ba6e5af451fea5fcf2f1ccb543a

Contents?: true

Size: 489 Bytes

Versions: 35

Compression:

Stored size: 489 Bytes

Contents

# encoding: utf-8
module Mongoid
  module Matchable

    # Performs less than or equal to matching.
    class Lte < Default

      # Return true if the attribute is less 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, :<=)
      end
    end
  end
end

Version data entries

35 entries across 32 versions & 6 rubygems

Version Path
mongoid-5.0.0.rc0 lib/mongoid/matchable/lte.rb
mongoid-5.0.0.beta lib/mongoid/matchable/lte.rb
mongoid-4.0.2 lib/mongoid/matchable/lte.rb
mongoid-4.0.1 lib/mongoid/matchable/lte.rb
mongoid-4.0.0 lib/mongoid/matchable/lte.rb
mongoid-4.0.0.rc2 lib/mongoid/matchable/lte.rb
mongoid-4.0.0.rc1 lib/mongoid/matchable/lte.rb
mongoid-4.0.0.beta2 lib/mongoid/matchable/lte.rb
mongoid-4.0.0.beta1 lib/mongoid/matchable/lte.rb
mongoid-4.0.0.alpha2 lib/mongoid/matchable/lte.rb
mongoid-4.0.0.alpha1 lib/mongoid/matchable/lte.rb
sepastian-mongoid-rails4-4.0.1.alpha lib/mongoid/matchable/lte.rb
sepastian-mongoid-rails4-4.0.0.alpha lib/mongoid/matchable/lte.rb
mongoid_heroku_stable-4.0.0 lib/mongoid/matchable/lte.rb
mongoid_rails4-4.0.0 lib/mongoid/matchable/lte.rb