Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5923ee0

Browse files
ybiquitousyugui
authored andcommitted
Add options doc: :write_converters, :write_nil_value, :write_empty_value (#87)
1 parent de0257d commit 5923ee0

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

lib/csv.rb

+13-3
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)