Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/gogo_csv/array.rb

Instance Method Summary collapse

Instance Method Details

#save!(path = nil) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/gogo_csv/array.rb', line 3

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