From d9eff306f5806c6a1b79019ec44395e4cc816218 Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Wed, 24 Jun 2020 16:04:25 -0500 Subject: [ruby/csv] Organize files in doc/ (#145) https://github.com/ruby/csv/commit/bc9ea859b0 --- doc/csv/options/generating/force_quotes.rdoc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 doc/csv/options/generating/force_quotes.rdoc (limited to 'doc/csv/options/generating/force_quotes.rdoc') diff --git a/doc/csv/options/generating/force_quotes.rdoc b/doc/csv/options/generating/force_quotes.rdoc new file mode 100644 index 0000000000..11afd1a16c --- /dev/null +++ b/doc/csv/options/generating/force_quotes.rdoc @@ -0,0 +1,17 @@ +====== Option +force_quotes+ + +Specifies the boolean that determines whether each output field is to be double-quoted. + +Default value: + CSV::DEFAULT_OPTIONS.fetch(:force_quotes) # => false + +For examples in this section: + ary = ['foo', 0, nil] + +Using the default, +false+: + str = CSV.generate_line(ary) + str # => "foo,0,\n" + +Using +true+: + str = CSV.generate_line(ary, force_quotes: true) + str # => "\"foo\",\"0\",\"\"\n" -- cgit v1.2.3