Class: Hoarder::Storage
- Inherits:
-
Object
- Object
- Hoarder::Storage
- Defined in:
- lib/hoarder/storage.rb
Instance Method Summary collapse
- #absolute_path ⇒ Object
-
#initialize(path) ⇒ Storage
constructor
A new instance of Storage.
- #locker ⇒ Object
- #public ⇒ Object
Constructor Details
#initialize(path) ⇒ Storage
Returns a new instance of Storage.
4 5 6 7 8 9 10 |
# File 'lib/hoarder/storage.rb', line 4 def initialize(path) @absolute_path = path @config = load_config("#{@absolute_path}/hoarder.yml") @public = @config['public'] || true @connection = set_connection(@config['provider'], @config) @locker = set_locker(@config['container'], @public) end |
Instance Method Details
#absolute_path ⇒ Object
12 13 14 |
# File 'lib/hoarder/storage.rb', line 12 def absolute_path @absolute_path end |
#locker ⇒ Object
16 17 18 |
# File 'lib/hoarder/storage.rb', line 16 def locker @locker end |
#public ⇒ Object
20 21 22 |
# File 'lib/hoarder/storage.rb', line 20 def public @public end |