Module: Google::Cloud::Dataproc::ClusterController
- Defined in:
- lib/google/cloud/dataproc.rb
Class Method Summary collapse
-
.new(version: , credentials: , scopes: , client_config: , timeout: ) ⇒ Object
The ClusterControllerService provides methods to manage clusters of Google Compute Engine instances.
Class Method Details
.new(version: , credentials: , scopes: , client_config: , timeout: ) ⇒ Object
The ClusterControllerService provides methods to manage clusters of Google Compute Engine instances.
149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/google/cloud/dataproc.rb', line 149 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)::ClusterController.new(*args, **kwargs) end |