Class: CsvComposer::FileExporters::StringIo

Inherits:
Base
  • Object
show all
Defined in:
lib/csv_composer/file_exporters/string_io.rb

Instance Method Summary collapse

Instance Method Details

#export(content, opts = { }) ⇒ Object



4
5
6
7
8
9
# File 'lib/csv_composer/file_exporters/string_io.rb', line 4

def export(content, opts = { })
  file = StringIO.open(content)
  file.class.class_eval { attr_accessor :original_filename }
  file.original_filename = opts[:filename]
  file
end