Sha256: 22cc1e5d435a716551f01d48d89db54eb994bb8f6b8ff5c9918b1179356299fc
Contents?: true
Size: 363 Bytes
Versions: 1
Compression:
Stored size: 363 Bytes
Contents
module GogoCsv class ::Array def save!(path) raise 'should be array of array' unless arys? raise 'Should supply file path' unless path ||= $path CSV.open(File.expand_path(path), "wb") do |csv| each { |ary| csv << ary } end end private def arys? all? { |item| item.is_a?(Array) } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gogo_csv-0.0.2 | lib/gogo_csv/array.rb |