lib/gogo_csv/array.rb in gogo_csv-0.0.2 vs lib/gogo_csv/array.rb in gogo_csv-0.0.3
- old
+ new
@@ -1,9 +1,9 @@
module GogoCsv
class ::Array
- def save!(path)
+ def save!(path=nil)
raise 'should be array of array' unless arys?
- raise 'Should supply file path' unless path ||= $path
+ raise 'Should supply file path' unless path ||= $current_path
CSV.open(File.expand_path(path), "wb") do |csv|
each { |ary| csv << ary }
end
end