Class: Tumugi::Plugin::GoogleCloudStorage::AtomicFile
- Inherits:
-
AtomicFile
- Object
- AtomicFile
- Tumugi::Plugin::GoogleCloudStorage::AtomicFile
- Defined in:
- lib/tumugi/plugin/google_cloud_storage/atomic_file.rb
Instance Method Summary collapse
-
#initialize(path, fs) ⇒ AtomicFile
constructor
A new instance of AtomicFile.
- #move_to_final_destination(temp_file) ⇒ Object
Constructor Details
#initialize(path, fs) ⇒ AtomicFile
Returns a new instance of AtomicFile.
7 8 9 10 |
# File 'lib/tumugi/plugin/google_cloud_storage/atomic_file.rb', line 7 def initialize(path, fs) super(path) @fs = fs end |
Instance Method Details
#move_to_final_destination(temp_file) ⇒ Object
12 13 14 |
# File 'lib/tumugi/plugin/google_cloud_storage/atomic_file.rb', line 12 def move_to_final_destination(temp_file) @fs.upload(temp_file, path) end |