Module: OmniStore::Storage

Extended by:
Storage
Included in:
Storage
Defined in:
lib/omnistore/storage.rb,
lib/omnistore/storage/s3.rb,
lib/omnistore/storage/local.rb,
lib/omnistore/storage/s3/mountpoint.rb,
lib/omnistore/storage/local/mountpoint.rb

Defined Under Namespace

Modules: Local, S3

Instance Method Summary collapse

Instance Method Details

#remount!Object



10
11
12
13
14
15
16
# File 'lib/omnistore/storage.rb', line 10

def remount!
  unless OmniStore::Storage.const_defined?(camelcase(OmniStore::Config.storage))
    require "omnistore/storage/#{OmniStore::Config.storage}"
  end
  @storage = OmniStore::Storage.const_get(camelcase(OmniStore::Config.storage))
  @storage.mount!
end

#storageObject



5
6
7
8
# File 'lib/omnistore/storage.rb', line 5

def storage
  remount! unless @storage
  @storage
end