Class: Matrix

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

Instance Method Summary collapse

Instance Method Details

#save!(path = nil) ⇒ Object



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

def save!(path=nil)
  raise 'Should supply file path' unless path ||= $current_path
  CSV.open(File.expand_path(path), "wb") do |csv|
    row_vectors.each { |v| csv << v.to_a }
  end
end