Method: Mongo::Cursor#rewind!

Defined in:
lib/mongo/cursor.rb

#rewind!Object

Reset this cursor on the server. Cursor options, such as the query string and the values for skip and limit, are preserved.



95
96
97
98
99
100
101
102
103
# File 'lib/mongo/cursor.rb', line 95

def rewind!
  close
  @cache.clear
  @cursor_id  = nil
  @closed     = false
  @query_run  = false
  @n_received = nil
  true
end