Sha256: 789da8558b35a0d2a859a3e7de4a22999e11bac7cba55dcc736af149c696eb0e

Contents?: true

Size: 432 Bytes

Versions: 32

Compression:

Stored size: 432 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
      
      def make_hash v
        {"$#{operator}" => v}
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
mongoid_geo-0.6.0 lib/mongoid/geo/criterion/complex.rb
mongoid_geo-0.5.4.1 lib/mongoid/geo/criterion/complex.rb
mongoid_geo-0.5.4 lib/mongoid/geo/criterion/complex.rb
mongoid_geo-0.5.3 lib/mongoid/geo/criterion/complex.rb
mongoid_geo-0.5.2 lib/mongoid/geo/criterion/complex.rb
mongoid_geo-0.5.1 lib/mongoid/geo/criterion/complex.rb
mongoid_geo-0.5.0 lib/mongoid/geo/criterion/complex.rb
mongoid_geo-0.4.3 lib/mongoid/geo/criterion/complex.rb
mongoid_geo-0.4.2 lib/mongoid/geo/criterion/complex.rb
mongoid_geo-0.4.1 lib/mongoid/geo/criterion/complex.rb
mongoid_geo-0.4.0 lib/mongoid/geo/criterion/complex.rb
mongoid_geo-0.3.2 lib/mongoid/geo/criterion/complex.rb
mongoid_geo-0.3.1 lib/mongoid/geo/criterion/complex.rb
mongoid_geo-0.3.0 lib/mongoid/geo/criterion/complex.rb
mongoid_geo-0.2.6 lib/mongoid/geo/criterion/complex.rb
mongoid_geo-0.2.5 lib/mongoid/geo/criterion/complex.rb
mongoid_geo-0.2.4 lib/mongoid/geo/criterion/complex.rb
mongoid_geo-0.2.3 lib/mongoid/geo/criterion/complex.rb
mongoid_geo-0.2.2.1 lib/mongoid/geo/criterion/complex.rb
mongoid_geo-0.2.2 lib/mongoid/geo/criterion/complex.rb