Class: CarrierWaveStringFile

Inherits:
StringIO
  • Object
show all
Defined in:
lib/carrier_wave_string_file.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new_file(file_content:, filename:, content_type: "application/octet-stream") ⇒ Object


8
9
10
11
12
13
14
# File 'lib/carrier_wave_string_file.rb', line 8

def self.new_file(file_content:, filename:, content_type: "application/octet-stream")
  {
    "tempfile" => StringIO.new(file_content),
    "filename" => filename,
    "content_type" => content_type
  }
end

Instance Method Details

#original_filenameObject


4
5
6
# File 'lib/carrier_wave_string_file.rb', line 4

def original_filename
  ""
end