class Google::Cloud::Storage::Bucket::List

def all request_limit: nil, &block

Other tags:
    Example: Limit the number of API calls made: -
    Example: Using the enumerator by not passing a block: -
    Example: Iterating each bucket by passing a block: -

Returns:
  • (Enumerator) -

Other tags:
    Yieldparam: bucket - The bucket object.

Other tags:
    Yield: - The block for accessing each bucket.

Parameters:
  • request_limit (Integer) -- The upper limit of API requests to
def all request_limit: nil, &block
  request_limit = request_limit.to_i if request_limit
  unless block_given?
    return enum_for :all, request_limit: request_limit
  end
  results = self
  loop do
    results.each(&block)
    if request_limit
      request_limit -= 1
      break if request_limit.negative?
    end
    break unless results.next?
    results = results.next
  end
end