Sha256: 142a4d49583f367359f7d9d2cf72656f39e0c068c577fb1eb9b80d36c5724e1d

Contents?: true

Size: 482 Bytes

Versions: 17

Compression:

Stored size: 482 Bytes

Contents

# encoding: utf-8
module Mongoid
  module Matchable

    # Performs non-equivalency checks.
    class Ne < Default

      # Return true if the attribute and first value are not equal.
      #
      # @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)
        !super(value.values.first)
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
mongoid-6.4.8 lib/mongoid/matchable/ne.rb
mongoid-6.4.7 lib/mongoid/matchable/ne.rb
mongoid-6.4.5 lib/mongoid/matchable/ne.rb
mongoid-6.4.4 lib/mongoid/matchable/ne.rb
mongoid-6.4.2 lib/mongoid/matchable/ne.rb
mongoid-7.0.2 lib/mongoid/matchable/ne.rb
mongoid-7.0.1 lib/mongoid/matchable/ne.rb
mongoid-6.4.1 lib/mongoid/matchable/ne.rb
tdiary-5.0.8 vendor/bundle/gems/mongoid-6.4.0/lib/mongoid/matchable/ne.rb
mongoid-7.0.0 lib/mongoid/matchable/ne.rb
mongoid-6.4.0 lib/mongoid/matchable/ne.rb
mongoid-6.3.0 lib/mongoid/matchable/ne.rb
mongoid-6.2.1 lib/mongoid/matchable/ne.rb
mongoid-7.0.0.beta lib/mongoid/matchable/ne.rb
tdiary-5.0.5 vendor/bundle/gems/mongoid-6.2.0/lib/mongoid/matchable/ne.rb
mongoid-6.2.0 lib/mongoid/matchable/ne.rb
mongoid-6.1.1 lib/mongoid/matchable/ne.rb