From 04b0b926d45991d25b5637f9601766954ef01bce Mon Sep 17 00:00:00 2001 From: Jim Menard Date: Tue, 3 Feb 2009 12:43:09 -0500 Subject: [PATCH] comments --- lib/mongo/cursor.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/mongo/cursor.rb b/lib/mongo/cursor.rb index 56c87df..af81609 100644 --- a/lib/mongo/cursor.rb +++ b/lib/mongo/cursor.rb @@ -42,13 +42,15 @@ module XGen def closed?; @closed; end - # Return +true+ if there are more records to retrieve. We do not check - # @num_to_return; #each is responsible for doing that. + # Internal method, not for general use. Return +true+ if there are + # more records to retrieve. We do not check @num_to_return; #each is + # responsible for doing that. def more? num_remaining > 0 end - # Return the next object. Raises an error if necessary. + # Return the next object or nil if there are no more. Raises an error + # if necessary. def next_object refill_via_get_more if num_remaining == 0 o = @cache.shift