Class: Configuration::S3SourceStoreBase::CacheRoot
- Inherits:
-
Object
- Object
- Configuration::S3SourceStoreBase::CacheRoot
- Defined in:
- lib/httpimagestore/configuration/s3.rb
Defined Under Namespace
Classes: CacheFile, CacheRootNotAccessibleError, CacheRootNotDirError, CacheRootNotWritableError
Constant Summary collapse
- CacheRootError =
Class.new ArgumentError
Instance Method Summary collapse
- #cache_file(bucket, key) ⇒ Object
-
#initialize(root_dir) ⇒ CacheRoot
constructor
A new instance of CacheRoot.
Constructor Details
#initialize(root_dir) ⇒ CacheRoot
Returns a new instance of CacheRoot.
145 146 147 148 149 150 |
# File 'lib/httpimagestore/configuration/s3.rb', line 145 def initialize(root_dir) @root = Pathname.new(root_dir) @root.directory? or raise CacheRootNotDirError.new(root_dir) @root.executable? or raise CacheRootNotAccessibleError.new(root_dir) @root.writable? or raise CacheRootNotWritableError.new(root_dir) end |