Class: Paperclip::AttachmentAdapter
- Inherits:
-
AbstractAdapter
- Object
- AbstractAdapter
- Paperclip::AttachmentAdapter
- Defined in:
- lib/paperclip/io_adapters/attachment_adapter.rb
Constant Summary
Constants inherited from AbstractAdapter
Paperclip::AbstractAdapter::OS_RESTRICTED_CHARACTERS
Instance Attribute Summary
Attributes inherited from AbstractAdapter
#content_type, #original_filename, #size
Instance Method Summary collapse
-
#initialize(target) ⇒ AttachmentAdapter
constructor
A new instance of AttachmentAdapter.
Methods inherited from AbstractAdapter
#assignment?, #fingerprint, #inspect, #nil?, #read
Constructor Details
#initialize(target) ⇒ AttachmentAdapter
Returns a new instance of AttachmentAdapter.
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/paperclip/io_adapters/attachment_adapter.rb', line 3 def initialize(target) @target, @style = case target when Paperclip::Attachment [target, :original] when Paperclip::Style [target., target.name] end cache_current_values end |