Class: Gcloud::Storage::File::Updater
- Inherits:
-
Object
- Object
- Gcloud::Storage::File::Updater
- Defined in:
- lib/gcloud/storage/file.rb
Overview
Yielded to a block to accumulate changes for a patch request.
Constant Summary collapse
- ATTRS =
[:cache_control, :content_disposition, :content_encoding, :content_language, :content_type, :metadata]
Instance Attribute Summary collapse
-
#updates ⇒ Object
readonly
Returns the value of attribute updates.
Instance Method Summary collapse
-
#initialize(metadata) ⇒ Updater
constructor
Create an Updater object.
-
#metadata ⇒ Object
Return metadata for mutation.
Constructor Details
#initialize(metadata) ⇒ Updater
Create an Updater object.
768 769 770 771 772 773 774 775 |
# File 'lib/gcloud/storage/file.rb', line 768 def initialize = if .nil? {} else .dup end @updates = {} end |
Instance Attribute Details
#updates ⇒ Object (readonly)
Returns the value of attribute updates.
765 766 767 |
# File 'lib/gcloud/storage/file.rb', line 765 def updates @updates end |
Instance Method Details
#metadata ⇒ Object
Return metadata for mutation. Also adds metadata to @updates so that it is included in the patch request.
789 790 791 |
# File 'lib/gcloud/storage/file.rb', line 789 def updates[:metadata] ||= end |