Class: Mongoid::ComplexCriterion

Inherits:
Object
  • Object
show all
Defined in:
lib/mongoid/complex_criterion.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ ComplexCriterion

Returns a new instance of ComplexCriterion.



6
7
8
# File 'lib/mongoid/complex_criterion.rb', line 6

def initialize opts = {}
  @key, @operator = opts[:key], opts[:operator]
end

Instance Attribute Details

#keyObject

Returns the value of attribute key.



4
5
6
# File 'lib/mongoid/complex_criterion.rb', line 4

def key
  @key
end

#operatorObject

Returns the value of attribute operator.



4
5
6
# File 'lib/mongoid/complex_criterion.rb', line 4

def operator
  @operator
end