Is there anyway to write the following code in Ruby without writing the file to disk?
temp_file = 'path/to/file.csv'
users = [a@b.c, c@b.a]
CSV.open(temp_file, "w") do |csv|
csv << data_for_report
end
Reports.sendreport users temp_file
File.delete(temp_file)
The Reports.sendreport attaches a file and sends an email, so it needs to be a file...