Class: Service::BetterS3Service
- Inherits:
-
S3Service
- Object
- S3Service
- Service::BetterS3Service
- Defined in:
- lib/generators/rockstart/storage/active_storage/templates/better_s3_service.rb
Overview
Adds handling of path-prefixes to S3 Adapted from: github.com/rails/rails/issues/32790
Instance Attribute Summary collapse
-
#bucket ⇒ Object
readonly
Returns the value of attribute bucket.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#root ⇒ Object
readonly
Returns the value of attribute root.
-
#upload_options ⇒ Object
readonly
Returns the value of attribute upload_options.
Instance Method Summary collapse
-
#initialize(bucket:, upload: {}, **options) ⇒ BetterS3Service
constructor
A new instance of BetterS3Service.
Constructor Details
#initialize(bucket:, upload: {}, **options) ⇒ BetterS3Service
Returns a new instance of BetterS3Service.
14 15 16 17 |
# File 'lib/generators/rockstart/storage/active_storage/templates/better_s3_service.rb', line 14 def initialize(bucket:, upload: {}, **) @root = .delete(:root) super(bucket: bucket, upload: upload, **) end |
Instance Attribute Details
#bucket ⇒ Object (readonly)
Returns the value of attribute bucket.
12 13 14 |
# File 'lib/generators/rockstart/storage/active_storage/templates/better_s3_service.rb', line 12 def bucket @bucket end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
12 13 14 |
# File 'lib/generators/rockstart/storage/active_storage/templates/better_s3_service.rb', line 12 def client @client end |
#root ⇒ Object (readonly)
Returns the value of attribute root.
12 13 14 |
# File 'lib/generators/rockstart/storage/active_storage/templates/better_s3_service.rb', line 12 def root @root end |
#upload_options ⇒ Object (readonly)
Returns the value of attribute upload_options.
12 13 14 |
# File 'lib/generators/rockstart/storage/active_storage/templates/better_s3_service.rb', line 12 def @upload_options end |