app/dao/swimmer_training_pace_dao.rb
# Create a CSV file (; delimited) with season ponderated calculation data
#

Create a CSV file (; delimited) with season ponderated calculation data
Create a CSV file ( ; delimited ) with season ponderated calculation data
def to_csv( csv_file_name = 'TrainingPace_' + @test_type + '_' + @pool_length.to_s + '_' + @date_swam.to_s )
    rows = []
    File.open( csv_file_name + '.csv', 'w' ) do |f|
      pace_titles = ['gender',  'category', 'event', 'pool', 'total_results', 'ponderated best', 'best results']
      rows << pace_titles.join(';')
      pace_row = ''
      rows << pace_row.join(';')
      f.puts rows.map{ |row| row }
    end
  end
def to_csv ( csv_file_name = 'TrainingPace_' + @test_type + '_' + @pool_length . to_s + '_' + @date_swam . to_s ) rows = [ ] File . open ( csv_file_name + '.csv' , 'w' ) do | f | pace_titles = [ 'gender' , 'category' , 'event' , 'pool' , 'total_results' , 'ponderated best' , 'best results' ] rows << pace_titles . join ( ';' ) pace_row = '' rows << pace_row . join ( ';' ) f . puts rows . map { | row | row } end end
Create a CSV file (; delimited) with season ponderated calculation data
Create a CSV file ( ; delimited ) with season ponderated calculation data
csv_file_name
<not_specific>
to_s
<not_specific>