diff options
author | Masafumi Koba <473530+ybiquitous@users.noreply.github.com> | 2019-04-20 00:42:40 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-07-14 23:07:31 +0900 |
commit | 75620c804ea47de040016ccf9766c016f2934df2 (patch) | |
tree | ef809088243102887fba8419f1c8a7fde796fb5a | |
parent | fe40841bfb031d278daea5b05fb13084f887fec5 (diff) | |
download | ruby-75620c804ea47de040016ccf9766c016f2934df2.tar.gz |
[ruby/csv] Add options doc: :write_converters, :write_nil_value, :write_empty_value (#87)
https://github.com/ruby/csv/commit/5923ee08b7
-rw-r--r-- | lib/csv.rb | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/csv.rb b/lib/csv.rb index 086f0351e6..44fbd212b0 100644 --- a/lib/csv.rb +++ b/lib/csv.rb @@ -885,9 +885,19 @@ class CSV # blank string field is replaced by # the set object. # <b><tt>:quote_empty</tt></b>:: TODO - # <b><tt>:write_converters</tt></b>:: TODO - # <b><tt>:write_nil_value</tt></b>:: TODO - # <b><tt>:write_empty_value</tt></b>:: TODO + # <b><tt>:write_converters</tt></b>:: Converts values on each line with the + # specified <tt>Proc</tt> object(s), + # which receive a <tt>String</tt> value + # and return a <tt>String</tt> or +nil+ + # value. + # When an array is specified, each + # converter will be applied in order. + # <b><tt>:write_nil_value</tt></b>:: When a <tt>String</tt> value, +nil+ + # value(s) on each line will be replaced + # with the specified value. + # <b><tt>:write_empty_value</tt></b>:: When a <tt>String</tt> or +nil+ value, + # empty value(s) on each line will be + # replaced with the specified value. # <b><tt>:strip</tt></b>:: When set to a +true+ value, CSV will # strip "\t\r\n\f\v" around the values. # If you specify a string instead of |