Maintenance Ruby 3.3 gets fixes, but no new features. 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.3.0/lib/csv.rb, line 2134
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