Class: CarrierWave::Storage::Abstract

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

Overview

This file serves mostly as a specification for Storage engines. There is no requirement that storage engines must be a subclass of this class.

Direct Known Subclasses

CloudFiles, File, Fog, S3

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uploader) ⇒ Abstract

Returns a new instance of Abstract.



14
15
16
# File 'lib/carrierwave/storage/abstract.rb', line 14

def initialize(uploader)
  @uploader = uploader
end

Instance Attribute Details

#uploaderObject (readonly)

Returns the value of attribute uploader.



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

def uploader
  @uploader
end

Instance Method Details

#identifierObject



18
19
20
# File 'lib/carrierwave/storage/abstract.rb', line 18

def identifier
  uploader.filename
end

#retrieve!(identifier) ⇒ Object



25
26
# File 'lib/carrierwave/storage/abstract.rb', line 25

def retrieve!(identifier)
end

#store!(file) ⇒ Object



22
23
# File 'lib/carrierwave/storage/abstract.rb', line 22

def store!(file)
end