Class: PacBio::Worksheet

Inherits:
Object
  • Object
show all
Defined in:
app/models/pac_bio/worksheet.rb

Instance Method Summary collapse

Instance Method Details

#create_csv_from_batch(batch) ⇒ Object



3
4
5
6
7
8
9
10
# File 'app/models/pac_bio/worksheet.rb', line 3

def create_csv_from_batch(batch)
  csv_string =
    CSV.generate(row_sep: "\r\n") do |csv|
      (batch).each { |header_row| csv << header_row }
      csv << column_headers
      batch.requests.each_with_index { |request, _index| csv << (row(request)) }
    end
end