lib/flex_station_data/plate.rb in flex-station-data-0.3.1 vs lib/flex_station_data/plate.rb in flex-station-data-0.3.2
- old
+ new
@@ -1,12 +1,21 @@
+require "flex_station_data/sample"
+
module FlexStationData
class Plate
- attr_reader :label, :times, :temperatures, :samples
+ attr_reader :label, :times, :temperatures, :wells, :sample_map
- def initialize(label, times, temperatures, samples)
+ def initialize(label, times, temperatures, wells, sample_map)
@label = label
@times = times
@temperatures = temperatures
- @samples = samples
+ @wells = wells
+ @sample_map = sample_map
+ end
+
+ def samples
+ @samples ||= sample_map.map do |label, well_labels|
+ Sample.new(label, well_labels, self)
+ end
end
end
end