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.6.21 lib/mongoid/criterion/complex.rb
mongoid-2.0.0.beta.17 lib/mongoid/criterion/complex.rb
mongo_doc-0.6.20 lib/mongoid/criterion/complex.rb
mongo_doc-0.6.19 lib/mongoid/criterion/complex.rb
mongo_doc-0.6.18 lib/mongoid/criterion/complex.rb
mongo_doc-0.6.17 lib/mongoid/criterion/complex.rb
mongo_doc-0.6.16 lib/mongoid/criterion/complex.rb
mongo_doc-0.6.15 lib/mongoid/criterion/complex.rb
mongoid-2.0.0.beta.16 lib/mongoid/criterion/complex.rb
mongo_doc-0.6.14 lib/mongoid/criterion/complex.rb
mongoid-2.0.0.beta.15 lib/mongoid/criterion/complex.rb
mongoid-2.0.0.beta.14 lib/mongoid/criterion/complex.rb
mongoid-2.0.0.beta.13 lib/mongoid/criterion/complex.rb
mongoid-2.0.0.beta.11 lib/mongoid/criterion/complex.rb
mongoid-2.0.0.beta.10 lib/mongoid/criterion/complex.rb
mongoid-2.0.0.beta.7 lib/mongoid/criterion/complex.rb
mongoid-2.0.0.beta.8 lib/mongoid/criterion/complex.rb
mongoid-2.0.0.beta.9 lib/mongoid/criterion/complex.rb
mongoid-2.0.0.beta.12 lib/mongoid/criterion/complex.rb
mongo_doc-0.6.13 lib/mongoid/criterion/complex.rb