lib/acb.rb in acb-0.1.3 vs lib/acb.rb in acb-0.1.4
- old
+ new
@@ -28,12 +28,11 @@
def get_data_from(row)
self.class.columns.get_data(row)
end
def content_string(**options)
- header_content = self.class.columns.header.join(',') + "\n"
-
- CSV.generate(header_content, **options) do |csv|
+ CSV.generate(**options) do |csv|
+ csv << self.class.columns.header
data.each do |row|
csv << get_data_from(row)
end
end
end