This commit is contained in:
Jim Menard 2009-02-03 12:43:09 -05:00
parent 768a3ab1a5
commit 04b0b926d4
1 changed files with 5 additions and 3 deletions

View File

@ -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