Class: S3DataPacker::Sources::S3Bucket

Inherits:
Bucket
  • Object
show all
Defined in:
lib/s3_data_packer/sources/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

#each(&block) ⇒ Object



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

def each(&block)
  each_key do |key|
    yield key
  end
end

#fetch(key) ⇒ Object



15
16
17
# File 'lib/s3_data_packer/sources/s3_bucket.rb', line 15

def fetch(key)
  download(key)
end

#nameObject



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

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