Class: Google::Cloud::Storage::Bucket::Updater

Inherits:
Google::Cloud::Storage::Bucket show all
Defined in:
lib/google/cloud/storage/bucket.rb

Overview

Yielded to a block to accumulate changes for a patch request.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Google::Cloud::Storage::Bucket

#acl, #api_url, #create_file, #created_at, #default_acl, #delete, #file, #files, #id, #kind, #location, #logging_bucket, #logging_bucket=, #logging_prefix, #logging_prefix=, #name, #post_object, #reload!, #signed_url, #storage_class, #update, #versioning=, #versioning?, #website_404, #website_404=, #website_main, #website_main=

Constructor Details

#initialize(gapi) ⇒ Updater

Create an Updater object.



953
954
955
956
957
# File 'lib/google/cloud/storage/bucket.rb', line 953

def initialize gapi
  @updates = []
  @gapi = gapi
  @cors_builder = nil
end

Instance Attribute Details

#updatesObject (readonly)

Returns the value of attribute updates



950
951
952
# File 'lib/google/cloud/storage/bucket.rb', line 950

def updates
  @updates
end

Instance Method Details

#cors {|@cors_builder| ... } ⇒ Object

Yields:

  • (@cors_builder)


959
960
961
962
963
964
# File 'lib/google/cloud/storage/bucket.rb', line 959

def cors
  # Same as Bucket#cors, but not frozen
  @cors_builder ||= Bucket::Cors.from_gapi @gapi.cors_configurations
  yield @cors_builder if block_given?
  @cors_builder
end