Class: S3DataPacker::Targets::S3Bucket

Inherits:
Bucket
  • Object
show all
Defined in:
lib/s3_data_packer/targets/s3_bucket.rb

Instance Attribute Summary

Attributes inherited from Bucket

#bucket_name, #path

Instance Method Summary collapse

Methods inherited from Bucket

#credentials, #download, #each_key, #exist?, #initialize, #logger, #region, #upload

Constructor Details

This class inherits a constructor from S3DataPacker::Bucket

Instance Method Details

#nameObject



5
6
7
# File 'lib/s3_data_packer/targets/s3_bucket.rb', line 5

def name
  "s3://#{bucket_name}/#{path}"
end

#save_file(filepath) ⇒ Object



9
10
11
12
# File 'lib/s3_data_packer/targets/s3_bucket.rb', line 9

def save_file(filepath)
  upload(filepath)
  File.delete(filepath) if S3DataPacker.config.cleanup_batch?
end