Class: Mongoid::Criterion::Complex

Inherits:
Object
  • Object
show all
Defined in:
lib/mongoid/geo/criterion/complex.rb

Overview

Complex criterion are used when performing operations on symbols to get get a shorthand syntax for where clauses.

Example:

{ :field => { "$lt" => "value" } } becomes: { :field.lt => "value }

Instance Method Summary collapse

Instance Method Details

#make_hash(v) ⇒ Object



14
15
16
# File 'lib/mongoid/geo/criterion/complex.rb', line 14

def make_hash v
  {"$#{operator}" => v}
end