summaryrefslogtreecommitdiff
path: root/doc/csv/options/generating/quote_empty.rdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/csv/options/generating/quote_empty.rdoc')
-rw-r--r--doc/csv/options/generating/quote_empty.rdoc12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/csv/options/generating/quote_empty.rdoc b/doc/csv/options/generating/quote_empty.rdoc
new file mode 100644
index 0000000000..4c5645c662
--- /dev/null
+++ b/doc/csv/options/generating/quote_empty.rdoc
@@ -0,0 +1,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"