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.
161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/google/cloud/dataproc.rb', line 161 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 |