Module: Mingo::Cursor::CollectionPlugin

Defined in:
lib/mingo/cursor.rb

Instance Method Summary collapse

Instance Method Details

#find(*args) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/mingo/cursor.rb', line 6

def find(*args)
  cursor = Cursor.from_mongo(super(*args))
  
  if block_given?
    yield cursor
    cursor.close()
    nil
  else
    cursor
  end
end