Method: Mongoid::Criteria#initialize

Defined in:
lib/mongoid/criteria.rb

#initialize(klass) ⇒ Criteria

Create the new Criteria object. This will initialize the selector and options hashes, as well as the type of criteria.

Options:

type: One of :all, :first:, or :last klass: The class to execute on.



125
126
127
# File 'lib/mongoid/criteria.rb', line 125

def initialize(klass)
  @selector, @options, @klass, @documents = {}, {}, klass, []
end