Class: Paperclip::StringioAdapter
- Inherits:
-
AbstractAdapter
- Object
- AbstractAdapter
- Paperclip::StringioAdapter
- Defined in:
- lib/paperclip/io_adapters/stringio_adapter.rb
Instance Attribute Summary collapse
-
#content_type ⇒ Object
writeonly
Sets the attribute content_type.
-
#original_filename ⇒ Object
writeonly
Sets the attribute original_filename.
Attributes inherited from AbstractAdapter
#content_type, #original_filename, #size
Instance Method Summary collapse
-
#initialize(target) ⇒ StringioAdapter
constructor
A new instance of StringioAdapter.
Methods inherited from AbstractAdapter
Constructor Details
#initialize(target) ⇒ StringioAdapter
Returns a new instance of StringioAdapter.
3 4 5 6 7 |
# File 'lib/paperclip/io_adapters/stringio_adapter.rb', line 3 def initialize(target) @target = target cache_current_values @tempfile = copy_to_tempfile(@target) end |
Instance Attribute Details
#content_type=(value) ⇒ Object (writeonly)
Sets the attribute content_type
9 10 11 |
# File 'lib/paperclip/io_adapters/stringio_adapter.rb', line 9 def content_type=(value) @content_type = value end |
#original_filename=(value) ⇒ Object (writeonly)
Sets the attribute original_filename
9 10 11 |
# File 'lib/paperclip/io_adapters/stringio_adapter.rb', line 9 def original_filename=(value) @original_filename = value end |