Module: Octopolo::Reports

Defined in:
lib/octopolo/reports.rb

Class Method Summary collapse

Class Method Details

.write_csv(data, filename) ⇒ Object

Public: Write the report data to the given file name

data - Array of report data, each element being a line of the CSV filename - The name of the file to write to



9
10
11
12
13
14
15
# File 'lib/octopolo/reports.rb', line 9

def self.write_csv data, filename
  CSV.open filename, "w" do |file|
    data.each do |line|
      file.puts line
    end
  end
end