Sha256: 98c827c8e13260300c2c7a509b0006e7f5cfda966b2acbe7a7ca0743686dc5af

Contents?: true

Size: 276 Bytes

Versions: 5

Compression:

Stored size: 276 Bytes

Contents

# encoding: utf-8
module Mongoid #:nodoc:
  module Matchers #:nodoc:
    class Lte < Default
      # Return true if the attribute is less than or equal to the value.
      def matches?(value)
        @attribute ? @attribute <= first(value) : false
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mongoid-1.1.4 lib/mongoid/matchers/lte.rb
mongoid-1.1.3 lib/mongoid/matchers/lte.rb
mongoid-1.1.2 lib/mongoid/matchers/lte.rb
mongoid-1.1.1 lib/mongoid/matchers/lte.rb
mongoid-1.1.0 lib/mongoid/matchers/lte.rb