Module: Google::Cloud::Dataproc::JobController
- Defined in:
- lib/google/cloud/dataproc.rb
Class Method Summary collapse
-
.new(version: , credentials: , scopes: , client_config: , timeout: ) ⇒ Object
The JobController provides methods to manage jobs.
Class Method Details
.new(version: , credentials: , scopes: , client_config: , timeout: ) ⇒ Object
The JobController provides methods to manage jobs.
196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/google/cloud/dataproc.rb', line 196 def self.new(*args, version: :v1, **kwargs) unless AVAILABLE_VERSIONS.include?(version.to_s.downcase) raise "The version: #{version} is not available. The available versions " \ "are: [#{AVAILABLE_VERSIONS.join(", ")}]" end require "#{FILE_DIR}/#{version.to_s.downcase}" version_module = Google::Cloud::Dataproc .constants .select {|sym| sym.to_s.downcase == version.to_s.downcase} .first Google::Cloud::Dataproc.const_get(version_module)::JobController.new(*args, **kwargs) end |