Class: Carrierwave::Nightcrawler::Swift::Storage
- Inherits:
-
CarrierWave::Storage::Abstract
- Object
- CarrierWave::Storage::Abstract
- Carrierwave::Nightcrawler::Swift::Storage
- Defined in:
- lib/carrierwave/nightcrawler/swift/storage.rb
Defined Under Namespace
Classes: SwiftFile
Instance Method Summary collapse
-
#initialize(uploader) ⇒ Storage
constructor
A new instance of Storage.
- #retrieve!(identifier) ⇒ Object
- #store!(file) ⇒ Object
Constructor Details
#initialize(uploader) ⇒ Storage
Returns a new instance of Storage.
5 6 7 |
# File 'lib/carrierwave/nightcrawler/swift/storage.rb', line 5 def initialize(uploader) super(uploader) end |
Instance Method Details
#retrieve!(identifier) ⇒ Object
14 15 16 |
# File 'lib/carrierwave/nightcrawler/swift/storage.rb', line 14 def retrieve!(identifier) SwiftFile.new({"name" => identifier}) end |
#store!(file) ⇒ Object
9 10 11 12 |
# File 'lib/carrierwave/nightcrawler/swift/storage.rb', line 9 def store!(file) upload = NightcrawlerSwift::Upload.new upload.execute @uploader.filename, ::File.new(file.file) end |