File: quote_empty.rdoc

package info (click to toggle)
ruby-csv 3.3.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 472 kB
  • sloc: ruby: 2,483; makefile: 3
file content (12 lines) | stat: -rw-r--r-- 350 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
====== Option +quote_empty+

Specifies the boolean that determines whether an empty value is to be double-quoted.

Default value:
  CSV::DEFAULT_OPTIONS.fetch(:quote_empty) # => true

With the default +true+:
  CSV.generate_line(['"', ""]) # => "\"\"\"\",\"\"\n"

With +false+:
    CSV.generate_line(['"', ""], quote_empty: false) # => "\"\"\"\",\n"