File: quote_empty.rdoc

package info (click to toggle)
ruby-csv 3.3.5-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 796 kB
  • sloc: ruby: 6,862; makefile: 4; sh: 4
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"