Class: Paperclip::StringioAdapter

Inherits:
AbstractAdapter show all
Defined in:
lib/paperclip/io_adapters/stringio_adapter.rb

Direct Known Subclasses

DataUriAdapter

Constant Summary

Constants inherited from AbstractAdapter

AbstractAdapter::OS_RESTRICTED_CHARACTERS

Instance Attribute Summary collapse

Attributes inherited from AbstractAdapter

#content_type, #original_filename, #size

Instance Method Summary collapse

Methods inherited from AbstractAdapter

#assignment?, #fingerprint, #inspect, #nil?, #read

Constructor Details

#initialize(target) ⇒ StringioAdapter

Returns a new instance of StringioAdapter.



3
4
5
6
# File 'lib/paperclip/io_adapters/stringio_adapter.rb', line 3

def initialize(target)
  @target = target
  cache_current_values
end

Instance Attribute Details

#content_type=(value) ⇒ Object (writeonly)

Sets the attribute content_type

Parameters:

  • value

    the value to set the attribute content_type to.



8
9
10
# File 'lib/paperclip/io_adapters/stringio_adapter.rb', line 8

def content_type=(value)
  @content_type = value
end