Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

CSV#write_headers?

csv.write_headers? → true or false

Returns the value that determines whether headers are to be written; used for generating; see Option write_headers:

Example
CSV.new('').write_headers? # => nil