Method: MongoDoc::Contexts::Mongo#one

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

#oneObject Also known as: first

Return the first result for the Context.

Example:

context.one

Return:

The first document in the collection.



218
219
220
# File 'lib/mongo_doc/contexts/mongo.rb', line 218

def one
  collection.find_one(selector, find_options)
end