Skip to content

Instantly share code, notes, and snippets.

@hugodias
Created July 24, 2017 20:20
Show Gist options
  • Select an option

  • Save hugodias/71ce775720f8046a07f0d805330217c8 to your computer and use it in GitHub Desktop.

Select an option

Save hugodias/71ce775720f8046a07f0d805330217c8 to your computer and use it in GitHub Desktop.
require 'csv'
my_array = [["a", "b"], ["c", "d"]]
CSV.open("myfile.csv", "w") do |csv|
my_array.each do |m|
csv << m
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment