Class: CarrierWave::Storage::AWS
- Inherits:
-
Abstract
- Object
- Abstract
- CarrierWave::Storage::AWS
- Defined in:
- lib/carrierwave/storage/aws.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.clear_connection_cache! ⇒ Object
14 15 16 |
# File 'lib/carrierwave/storage/aws.rb', line 14 def self.clear_connection_cache! @connection_cache = {} end |
.connection_cache ⇒ Object
10 11 12 |
# File 'lib/carrierwave/storage/aws.rb', line 10 def self.connection_cache @connection_cache ||= {} end |
Instance Method Details
#connection ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/carrierwave/storage/aws.rb', line 28 def connection @connection ||= begin conn_cache = self.class.connection_cache conn_cache[credentials] ||= ::Aws::S3::Resource.new(*credentials) end end |
#credentials ⇒ Object
36 37 38 |
# File 'lib/carrierwave/storage/aws.rb', line 36 def credentials [uploader.aws_credentials].compact end |