From 7ac19f1bfa529eae5bc2f59cab90ad4b2dc94432 Mon Sep 17 00:00:00 2001 From: Kyle Banker Date: Tue, 6 Sep 2011 16:23:55 -0400 Subject: [PATCH] minor: Cursor#next over Cursor#next_document --- lib/mongo/cursor.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/mongo/cursor.rb b/lib/mongo/cursor.rb index f592759..7941747 100644 --- a/lib/mongo/cursor.rb +++ b/lib/mongo/cursor.rb @@ -104,7 +104,7 @@ module Mongo # Note that this method only checks whether we have # a cursor id. The cursor may still have timed out # on the server. This will be indicated in the next - # call to Cursor#next_document. + # call to Cursor#next. # # @return [Boolean] def alive? @@ -114,7 +114,7 @@ module Mongo # Get the next document specified the cursor options. # # @return [Hash, Nil] the next document or Nil if no documents remain. - def next_document + def next refresh if @cache.length == 0 doc = @cache.shift @@ -138,7 +138,7 @@ module Mongo @transformer.call(doc) if doc end end - alias :next :next_document + alias :next_document :next # Reset this cursor on the server. Cursor options, such as the # query string and the values for skip and limit, are preserved.