Skip to content

Commit 75620c8

Browse files
ybiquitoushsbt
authored andcommitted
[ruby/csv] Add options doc: :write_converters, :write_nil_value, :write_empty_value (#87)
ruby/csv@5923ee08b7
1 parent fe40841 commit 75620c8

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

lib/csv.rb

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -885,9 +885,19 @@ def self.table(path, **options)
885885
# blank string field is replaced by
886886
# the set object.
887887
# <b><tt>:quote_empty</tt></b>:: TODO
888-
# <b><tt>:write_converters</tt></b>:: TODO
889-
# <b><tt>:write_nil_value</tt></b>:: TODO
890-
# <b><tt>:write_empty_value</tt></b>:: TODO
888+
# <b><tt>:write_converters</tt></b>:: Converts values on each line with the
889+
# specified <tt>Proc</tt> object(s),
890+
# which receive a <tt>String</tt> value
891+
# and return a <tt>String</tt> or +nil+
892+
# value.
893+
# When an array is specified, each
894+
# converter will be applied in order.
895+
# <b><tt>:write_nil_value</tt></b>:: When a <tt>String</tt> value, +nil+
896+
# value(s) on each line will be replaced
897+
# with the specified value.
898+
# <b><tt>:write_empty_value</tt></b>:: When a <tt>String</tt> or +nil+ value,
899+
# empty value(s) on each line will be
900+
# replaced with the specified value.
891901
# <b><tt>:strip</tt></b>:: When set to a +true+ value, CSV will
892902
# strip "\t\r\n\f\v" around the values.
893903
# If you specify a string instead of

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy