Sampat Badhe 2022-01-31 02:55:38 +05:30 committed by Nobuyoshi Nakada
parent 81c57ae7ac
commit 55a900d9cc
Notes: git 2023-05-24 16:44:40 +00:00
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ Without +write_headers+:
With +write_headers+": With +write_headers+":
CSV.open(file_path,'w', CSV.open(file_path,'w',
:write_headers=> true, :write_headers => true,
:headers => ['Name','Value'] :headers => ['Name','Value']
) do |csv| ) do |csv|
csv << ['foo', '0'] csv << ['foo', '0']

View File

@ -146,7 +146,7 @@ This example defines and uses a custom write converter to strip whitespace from
==== Recipe: Specify Multiple Write Converters ==== Recipe: Specify Multiple Write Converters
Use option <tt>:write_converters</tt> and multiple custom coverters Use option <tt>:write_converters</tt> and multiple custom converters
to convert field values when generating \CSV. to convert field values when generating \CSV.
This example defines and uses two custom write converters to strip and upcase generated fields: This example defines and uses two custom write converters to strip and upcase generated fields: