class FlexStationData::ParsePlate

Attributes

label[R]
plate_data[R]

Public Class Methods

new(label, plate_data) click to toggle source
# File lib/flex_station_data/services/parse_plate.rb, line 15
def initialize(label, plate_data)
  @label = label
  @plate_data = plate_data
end

Public Instance Methods

call() click to toggle source
# File lib/flex_station_data/services/parse_plate.rb, line 24
def call
  times, temperatures, wells = ParsePlateReadings.call(data_blocks[0])
  sample_map = ParseSampleMap.call(data_blocks[1])
  Plate.new(label, times, temperatures, wells, sample_map)
end
data_blocks() click to toggle source
# File lib/flex_station_data/services/parse_plate.rb, line 20
def data_blocks
  plate_data.split { |row| row[0] =~ /\A~End\s*\z/ }
end