Fix for ruby 3 compliance

This commit is contained in:
2023-11-28 10:38:36 -05:00
parent 8fce3cbbac
commit f16b8c60cc
+1 -1
View File
@@ -45,7 +45,7 @@ module Dunlop::CsvBuilder
return resource.to_csv if self.class == CsvBuilder and resource.present? and resource.respond_to?(:to_csv) and !resource.is_a?(Array) return resource.to_csv if self.class == CsvBuilder and resource.present? and resource.respond_to?(:to_csv) and !resource.is_a?(Array)
# try iteration otherwise # try iteration otherwise
str = CSV.generate csv_options do |csv| str = CSV.generate **csv_options do |csv|
csv << headers if headers.present? csv << headers if headers.present?
for_each_serialized_row do |serialized_row| for_each_serialized_row do |serialized_row|
csv << serialized_row csv << serialized_row