Class: Kvom::Storage::S3Storage
- Defined in:
- lib/kvom/storage/s3_storage.rb
Defined Under Namespace
Modules: CacheAware
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(options) ⇒ S3Storage
constructor
A new instance of S3Storage.
Methods inherited from Base
Constructor Details
#initialize(options) ⇒ S3Storage
Returns a new instance of S3Storage.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/kvom/storage/s3_storage.rb', line 9 def initialize() super @bucket = config[:bucket] or raise "No bucket specified" if "" != (bucket_prefix = config[:bucket_prefix].to_s) @bucket_prefix = bucket_prefix end if (cache = config[:cache]) cache_prefix = config[:cache_prefix].to_s @cache = if "" != cache_prefix CacheWithPrefix.new(cache, cache_prefix) else cache end extend S3Storage::CacheAware end end |