lib/dbf/table.rb
# Dumps all records to a CSV file.  If no filename is given then CSV is
# output to STDOUT.
#
# @param [optional String] path Defaults to STDOUT
Dumps all records to a CSV file.  If no filename is given then CSV is
output to STDOUT.
Dumps all records to a CSV file . If no filename is given then CSV is output to STDOUT .
def to_csv(path = nil)
      out_io = path ? File.open(path, 'w') : $stdout
      csv = csv_class.new(out_io, :force_quotes => true)
      csv << column_names
      each { |record| csv << record.to_a }
    end
def to_csv ( path = nil ) out_io = path ? File . open ( path , 'w' ) : $stdout csv = csv_class . new ( out_io , :force_quotes => true ) csv << column_names each { | record | csv << record . to_a } end
Dumps all records to a CSV file.
Dumps all records to a CSV file .
path
<not_specific>
<not_specific>
path Defaults to STDOUT
path Defaults to STDOUT