Class: Paperclip::FileAdapter
- Inherits:
-
AbstractAdapter
- Object
- AbstractAdapter
- Paperclip::FileAdapter
- Defined in:
- lib/paperclip/io_adapters/file_adapter.rb
Constant Summary
Constants inherited from AbstractAdapter
AbstractAdapter::OS_RESTRICTED_CHARACTERS
Instance Attribute Summary
Attributes inherited from AbstractAdapter
#content_type, #original_filename, #size, #tempfile
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(target, options = {}) ⇒ FileAdapter
constructor
A new instance of FileAdapter.
Methods inherited from AbstractAdapter
#assignment?, #fingerprint, #inspect, #nil?, #read
Constructor Details
#initialize(target, options = {}) ⇒ FileAdapter
Returns a new instance of FileAdapter.
9 10 11 12 |
# File 'lib/paperclip/io_adapters/file_adapter.rb', line 9 def initialize(target, = {}) super cache_current_values end |
Class Method Details
.register ⇒ Object
3 4 5 6 7 |
# File 'lib/paperclip/io_adapters/file_adapter.rb', line 3 def self.register Paperclip.io_adapters.register self do |target| File === target || ::Tempfile === target end end |