Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Document empty table :write_headers behavior
As James Gray pointed out in
http://rubyforge.org/tracker/index.php?func=detail&aid=29111&group_id=1102&atid=4335
, a table that only contains header rows must have :return_headers set
in order for :write_headers to write a header row.

This is now explicitly documented.
  • Loading branch information
daxelrod committed Apr 2, 2011
1 parent f2b8b32 commit edfc3e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/faster_csv.rb
Expand Up @@ -1402,6 +1402,10 @@ def self.table(path, options = Hash.new)
# through the converters).
# <b><tt>:write_headers</tt></b>:: When +true+ and <tt>:headers</tt> is
# set, a header row will be added to the
# output. Note that if the table only
# contains header rows,
# <tt>:return_headers</tt> must also be
# set in order for a header row to be
# output.
# <b><tt>:header_converters</tt></b>:: Identical in functionality to
# <tt>:converters</tt> save that the
Expand Down

0 comments on commit edfc3e0

Please sign in to comment.