Class: PassStation::Output::Csv

Inherits:
Object
  • Object
show all
Defined in:
lib/pass_station/output.rb

Overview

CSV formatter

Class Method Summary collapse

Class Method Details

.format(table) ⇒ Array<String>

Format the Array<CSV::Row> into a CSV

Parameters:

  • table (Array<CSV::Row>)

    an Array<CSV::Row>

Returns:

  • (Array<String>)

    the formatted CSV ready to be printed



209
210
211
# File 'lib/pass_station/output.rb', line 209

def format(table)
  CSV::Table.new(table).to_csv.split("\n")
end