Sha256: 5a8fcab14a51ebe757bad1811d161ac8ec013c836e71fc3df191ed6091b61beb

Contents?: true

Size: 539 Bytes

Versions: 87

Compression:

Stored size: 539 Bytes

Contents

# encoding: utf-8
module Mongoid #:nodoc:
  module Criterion #:nodoc:
    # Complex criterion are used when performing operations on symbols to get
    # get a shorthand syntax for where clauses.
    #
    # Example:
    #
    # <tt>{ :field => { "$lt" => "value" } }</tt>
    # becomes:
    # <tt> { :field.lt => "value }</tt>
    class Complex
      attr_accessor :key, :operator

      # Create the new complex criterion.
      def initialize(opts = {})
        @key, @operator = opts[:key], opts[:operator]
      end
    end
  end
end

Version data entries

87 entries across 87 versions & 10 rubygems

Version Path
mongo_doc-0.5.5 lib/mongoid/criterion/complex.rb
mongoid-pre-2.0.0.beta1 lib/mongoid/criterion/complex.rb
mongoid-2.0.0.alpha lib/mongoid/criterion/complex.rb
mongo_doc-0.4.2 lib/mongoid/criterion/complex.rb
mongoid-1.2.14 lib/mongoid/criterion/complex.rb
mongo_doc-0.4.1 lib/mongoid/criterion/complex.rb
mongo_doc-0.4.0 lib/mongoid/criterion/complex.rb
mongoid-1.2.13 lib/mongoid/criterion/complex.rb
mongoid-1.2.12 lib/mongoid/criterion/complex.rb
mongoid-1.2.11 lib/mongoid/criterion/complex.rb
mongoid-1.2.10 lib/mongoid/criterion/complex.rb
mongo_doc-0.3.2 lib/mongoid/criterion/complex.rb
mongoid-1.2.9 lib/mongoid/criterion/complex.rb
mongo_doc-0.3.1 lib/mongoid/criterion/complex.rb
mongo_doc-0.3.0 lib/mongoid/criterion/complex.rb
mongoid-1.2.8 lib/mongoid/criterion/complex.rb
mongodoc-0.2.4 lib/mongoid/criterion/complex.rb
mongoid-1.2.7 lib/mongoid/criterion/complex.rb
mongoid-pre-2.0.0.pre lib/mongoid/criterion/complex.rb
mongoid-1.2.6 lib/mongoid/criterion/complex.rb