Class: Paperclip::AbstractAdapter
- Inherits:
-
Object
- Object
- Paperclip::AbstractAdapter
- Defined in:
- lib/paperclip/io_adapters/abstract_adapter.rb
Direct Known Subclasses
AttachmentAdapter, FileAdapter, IdentityAdapter, NilAdapter, StringioAdapter, UploadedFileAdapter
Instance Attribute Summary collapse
-
#content_type ⇒ Object
readonly
Returns the value of attribute content_type.
-
#original_filename ⇒ Object
readonly
Returns the value of attribute original_filename.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Instance Method Summary collapse
Instance Attribute Details
#content_type ⇒ Object (readonly)
Returns the value of attribute content_type.
5 6 7 |
# File 'lib/paperclip/io_adapters/abstract_adapter.rb', line 5 def content_type @content_type end |
#original_filename ⇒ Object (readonly)
Returns the value of attribute original_filename.
5 6 7 |
# File 'lib/paperclip/io_adapters/abstract_adapter.rb', line 5 def original_filename @original_filename end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
5 6 7 |
# File 'lib/paperclip/io_adapters/abstract_adapter.rb', line 5 def size @size end |
Instance Method Details
#fingerprint ⇒ Object
8 9 10 |
# File 'lib/paperclip/io_adapters/abstract_adapter.rb', line 8 def fingerprint @fingerprint ||= Digest::MD5.file(path).to_s end |
#read(length = nil, buffer = nil) ⇒ Object
12 13 14 |
# File 'lib/paperclip/io_adapters/abstract_adapter.rb', line 12 def read(length = nil, buffer = nil) @tempfile.read(length, buffer) end |