Sha256: 423a2473828c92c0c4b8bb1f889d1085d4dd7a704a9c9655723984d83a01bc9c
Contents?: true
Size: 375 Bytes
Versions: 1
Compression:
Stored size: 375 Bytes
Contents
module GogoCsv class ::Array def save!(path=nil) raise 'should be array of array' unless arys? raise 'Should supply file path' unless path ||= $current_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.3 | lib/gogo_csv/array.rb |