====== Option +write_converters+

Specifies the \Proc or \Array of Procs that are to be called
for converting each output field.

Default value:
  CSV::DEFAULT_OPTIONS.fetch(:write_converters) # => nil

With no write converter:
  str = CSV.generate_line(["\na\n", "\tb\t", " c "])
  str # => "\"\na\n\",\tb\t, c \n"

With a write converter:
  strip_converter = lambda {|field| field.strip }
  str = CSV.generate_line(["\na\n", "\tb\t", " c "], write_converters: strip_converter)
  str # => "a,b,c\n"

With two write converters (called in order):
  upcase_converter = lambda {|field| field.upcase }
  downcase_converter = lambda {|field| field.downcase }
  write_converters = [upcase_converter, downcase_converter]
  str = CSV.generate_line(['a', 'b', 'c'], write_converters: write_converters)
  str # => "a,b,c\n"

---

Raises an exception if the converter returns a value that is neither +nil+
nor \String-convertible:
  bad_converter = lambda {|field| BasicObject.new }
  # Raises NoMethodError (undefined method `is_a?' for #<BasicObject:>)
  CSV.generate_line(['a', 'b', 'c'], write_converters: bad_converter)