class

CSV::Writer

ruby latest stable - Superclass: Object

Class not available on this version

This class is only available on newer versions. The first available version (v1_8_6_287) is shown here.

CSV formatted string/stream writer.

EXAMPLE

  Write rows to 'csvout' file.

  outfile = File.open('csvout', 'wb')
  CSV::Writer.generate(outfile) do |csv|
    csv << ['c1', nil, '', '"', "\r\n", 'c2']
    ...
  end

  outfile.close

Files

  • lib/csv.rb