Module: Google::Cloud
- Defined in:
- lib/google-cloud-storage.rb,
lib/google/cloud/storage.rb,
lib/google/cloud/storage/file.rb,
lib/google/cloud/storage/bucket.rb,
lib/google/cloud/storage/errors.rb,
lib/google/cloud/storage/project.rb,
lib/google/cloud/storage/service.rb,
lib/google/cloud/storage/version.rb,
lib/google/cloud/storage/file/acl.rb,
lib/google/cloud/storage/file/list.rb,
lib/google/cloud/storage/bucket/acl.rb,
lib/google/cloud/storage/bucket/cors.rb,
lib/google/cloud/storage/bucket/list.rb,
lib/google/cloud/storage/credentials.rb,
lib/google/cloud/storage/file/verifier.rb
Defined Under Namespace
Modules: Storage
Class Method Summary collapse
-
.storage(project = nil, keyfile = nil, scope: nil, retries: nil, timeout: nil) ⇒ Google::Cloud::Storage::Project
Creates a new object for connecting to the Storage service.
Instance Method Summary collapse
-
#storage(scope: nil, retries: nil, timeout: nil) ⇒ Google::Cloud::Storage::Project
Creates a new object for connecting to the Storage service.
Class Method Details
.storage(project = nil, keyfile = nil, scope: nil, retries: nil, timeout: nil) ⇒ Google::Cloud::Storage::Project
Creates a new object for connecting to the Storage service. Each call creates a new connection.
For more information on connecting to Google Cloud see the Authentication Guide.
105 106 107 108 109 110 111 |
# File 'lib/google-cloud-storage.rb', line 105 def self.storage project = nil, keyfile = nil, scope: nil, retries: nil, timeout: nil require "google/cloud/storage" Google::Cloud::Storage.new project: project, keyfile: keyfile, scope: scope, retries: retries, timeout: timeout end |
Instance Method Details
#storage(scope: nil, retries: nil, timeout: nil) ⇒ Google::Cloud::Storage::Project
Creates a new object for connecting to the Storage service. Each call creates a new connection.
For more information on connecting to Google Cloud see the Authentication Guide.
65 66 67 68 69 |
# File 'lib/google-cloud-storage.rb', line 65 def storage scope: nil, retries: nil, timeout: nil Google::Cloud.storage @project, @keyfile, scope: scope, retries: (retries || @retries), timeout: (timeout || @timeout) end |