📅  最后修改于: 2022-03-11 15:04:50.085000             🧑  作者: Mango
require 'csv'
file = "my_file.csv"
CSV.open( file, 'w' ) do |writer|
@coun.each do |c|
writer << [c.name, c.country_code, c.user_id, c.subscriber_id]
end
end