class Mongoid::FakeCriteria
Public Class Methods
new(documents)
click to toggle source
# File lib/mongoid/fake_criteria.rb, line 4 def initialize(documents) @documents = documents end
Public Instance Methods
as_json(options={})
click to toggle source
# File lib/mongoid/fake_criteria.rb, line 19 def as_json(options={}) @documents.as_json(options) end
limit(quantity)
click to toggle source
# File lib/mongoid/fake_criteria.rb, line 9 def limit(quantity) Mongoid::FakeCriteria.new(@documents[0..quantity-1]) end
method_missing(*args, &block)
click to toggle source
# File lib/mongoid/fake_criteria.rb, line 24 def method_missing(*args, &block) @documents.send(*args, &block) end
raw()
click to toggle source
# File lib/mongoid/fake_criteria.rb, line 14 def raw @documents end