Method: MongoDoc::Contexts::Mongo#count

Defined in:
lib/mongodoc/contexts/mongo.rb

#countObject

Get the count of matching documents in the database for the context.

Example:

context.count

Returns:

An Integer count of documents.



36
37
38
# File 'lib/mongodoc/contexts/mongo.rb', line 36

def count
  @count ||= collection.find(selector, options).count
end