Class: PacBio::Worksheet

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

Instance Method Summary collapse

Constructor Details

#initializeWorksheet

Returns a new instance of Worksheet


2
3
# File 'app/models/pac_bio/worksheet.rb', line 2

def initialize
end

Instance Method Details

#create_csv_from_batch(batch) ⇒ Object


5
6
7
8
9
10
11
12
13
# File 'app/models/pac_bio/worksheet.rb', line 5

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 do |request, _index|
      csv << (row(request))
    end
  end
end