Module: Google::Cloud
- Defined in:
- lib/google/cloud.rb,
lib/google/cloud/errors.rb,
lib/google/cloud/credentials.rb,
lib/google/cloud/core/version.rb
Defined Under Namespace
Modules: Core Classes: AbortedError, AlreadyExistsError, CanceledError, DataLossError, DeadlineExceededError, Error, FailedPreconditionError, InternalError, InvalidArgumentError, NotFoundError, OutOfRangeError, PermissionDeniedError, ResourceExhaustedError, UnauthenticatedError, UnavailableError, UnimplementedError, UnknownError
Class Method Summary collapse
-
.new(project_id = nil, credentials = nil, retries: nil, timeout: nil) ⇒ Google::Cloud
Creates a new object for connecting to Google Cloud.
Class Method Details
.new(project_id = nil, credentials = nil, retries: nil, timeout: nil) ⇒ Google::Cloud
Creates a new object for connecting to Google Cloud.
For more information on connecting to Google Cloud see the Authentication Guide.
61 62 63 64 65 66 67 68 69 |
# File 'lib/google/cloud.rb', line 61 def self.new project_id = nil, credentials = nil, retries: nil, timeout: nil gcloud = Object.new gcloud.instance_variable_set :@project, project_id gcloud.instance_variable_set :@keyfile, credentials gcloud.instance_variable_set :@retries, retries gcloud.instance_variable_set :@timeout, timeout gcloud.extend Google::Cloud gcloud end |