Class: Bulwark::S3Bucket
- Inherits:
-
Object
- Object
- Bulwark::S3Bucket
- Defined in:
- lib/bulwark/s3_bucket.rb
Instance Method Summary collapse
Instance Method Details
#client ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/bulwark/s3_bucket.rb', line 3 def client @client ||= begin Aws::S3::Client.new( access_key_id: ENV.fetch('S3_ACCESS_KEY_ID'), secret_access_key: ENV.fetch('S3_SECRET_ACCESS_KEY'), region: ENV.fetch('S3_REGION') ) end end |
#files ⇒ Object
13 14 15 16 17 |
# File 'lib/bulwark/s3_bucket.rb', line 13 def files raw_files.map do |file| { key: file.key, file_name: file.key.split('/').last } end end |
#name ⇒ Object
19 20 21 |
# File 'lib/bulwark/s3_bucket.rb', line 19 def name ENV.fetch('S3_BUCKET') end |