lib/google/cloud/bigquery/job/list.rb in google-cloud-bigquery-1.18.1 vs lib/google/cloud/bigquery/job/list.rb in google-cloud-bigquery-1.19.0
- old
+ new
@@ -69,13 +69,13 @@
# next_jobs = jobs.next
# end
def next
return nil unless next?
ensure_service!
- next_options = @options.merge token: token
- next_gapi = @service.list_jobs next_options
- self.class.from_gapi next_gapi, @service, next_options
+ next_kwargs = @kwargs.merge token: token
+ next_gapi = @service.list_jobs next_kwargs
+ self.class.from_gapi next_gapi, @service, next_kwargs
end
##
# Retrieves remaining results by repeatedly invoking {#next} until
# {#next?} returns `false`. Calls the given block once for each
@@ -137,15 +137,15 @@
end
##
# @private New Job::List from a Google API Client
# Google::Apis::BigqueryV2::JobList object.
- def self.from_gapi gapi_list, service, options = {}
+ def self.from_gapi gapi_list, service, **kwargs
jobs = List.new(Array(gapi_list.jobs).map { |gapi_object| Job.from_gapi gapi_object, service })
jobs.instance_variable_set :@token, gapi_list.next_page_token
jobs.instance_variable_set :@etag, gapi_list.etag
jobs.instance_variable_set :@service, service
- jobs.instance_variable_set :@options, options
+ jobs.instance_variable_set :@kwargs, kwargs
jobs
end
protected