End of Life Ruby 3.1 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
lib/csv.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/csv.rb, line 2133
def write_headers?
@writer_options[:write_headers]
end
Returns the value that determines whether headers are to be written; used for generating; see Option write_headers:
Example
CSV.new('').write_headers? # => nil