Class: Hoarder::Storage

Inherits:
Object
  • Object
show all
Defined in:
lib/hoarder/storage.rb

Instance Method Summary collapse

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_pathObject



12
13
14
# File 'lib/hoarder/storage.rb', line 12

def absolute_path
  @absolute_path 
end

#lockerObject



16
17
18
# File 'lib/hoarder/storage.rb', line 16

def locker
  @locker 
end

#publicObject



20
21
22
# File 'lib/hoarder/storage.rb', line 20

def public
  @public 
end