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