Class: CarrierWave::Storage::Fuzzy

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uploader) ⇒ Fuzzy

Returns a new instance of Fuzzy.



9
10
11
12
13
# File 'lib/carrierwave/storage/fuzzy.rb', line 9

def initialize(uploader)
  storage = uploader.model.public_send("#{uploader.mounted_as}_storage")
  storage_engine = uploader.storage_engines.fetch(storage.to_sym).constantize
  @final_storage = storage_engine.new(uploader)
end

Instance Attribute Details

#final_storageObject (readonly)

Returns the value of attribute final_storage.



7
8
9
# File 'lib/carrierwave/storage/fuzzy.rb', line 7

def final_storage
  @final_storage
end