Sha256: adea5cf1e9747006de33d8dcdf37b6ab72b2bc91724a622b8cdaba49c85b418f

Contents?: true

Size: 249 Bytes

Versions: 105

Compression:

Stored size: 249 Bytes

Contents

# encoding: utf-8
module Mongoid #:nodoc:
  module Matchers #:nodoc:
    class In < Default
      # Return true if the attribute is in the values.
      def matches?(value)
        value.values.first.include?(@attribute)
      end
    end
  end
end

Version data entries

105 entries across 105 versions & 12 rubygems

Version Path
mongo_doc-0.6.7 lib/mongoid/matchers/in.rb
mongo_doc-0.6.6 lib/mongoid/matchers/in.rb
mongo_doc-0.6.5 lib/mongoid/matchers/in.rb
mongo_doc-0.6.4 lib/mongoid/matchers/in.rb
mongo_doc_rails2-0.6.2 lib/mongoid/matchers/in.rb
mongo_doc-0.6.3 lib/mongoid/matchers/in.rb
mongo_doc-0.6.2 lib/mongoid/matchers/in.rb
mongoid-1.9.1 lib/mongoid/matchers/in.rb
chhean-mongoid-2.0.1.beta1 lib/mongoid/matchers/in.rb
mongoid-2.0.0.beta.5 lib/mongoid/matchers/in.rb
mongoid-1.9.0 lib/mongoid/matchers/in.rb
mongo_doc-0.6.1 lib/mongoid/matchers/in.rb
mongo_doc-0.6.0 lib/mongoid/matchers/in.rb
mongo_doc_rails2-0.6.1 lib/mongoid/matchers/in.rb
mongo_doc-0.5.5 lib/mongoid/matchers/in.rb
mongoid-pre-2.0.0.beta1 lib/mongoid/matchers/in.rb
mongoid-2.0.0.alpha lib/mongoid/matchers/in.rb
mongo_doc-0.4.2 lib/mongoid/matchers/in.rb
mongoid-1.2.14 lib/mongoid/matchers/in.rb
mongo_doc-0.4.1 lib/mongoid/matchers/in.rb