Class: Robots::Bed::Pooling
- Defined in:
- app/models/robots/bed/pooling.rb
Overview
Pooling beds can have multiple parents, and have additional methods to support this
Direct Known Subclasses
Instance Attribute Summary collapse
-
#parents ⇒ Object
Returns the value of attribute parents.
Instance Method Summary collapse
Instance Attribute Details
#parents ⇒ Object
Returns the value of attribute parents.
6 7 8 |
# File 'app/models/robots/bed/pooling.rb', line 6 def parents @parents end |
Instance Method Details
#each_parent ⇒ Object
8 9 10 11 12 13 |
# File 'app/models/robots/bed/pooling.rb', line 8 def each_parent range.each do |i| = parent_labware[i]&. || SBCF::EmptyBarcode.new yield(parents[i], ) end end |
#find_all_labware ⇒ Object
15 16 17 |
# File 'app/models/robots/bed/pooling.rb', line 15 def find_all_labware Sequencescape::Api::V2::Plate.find_all({ barcode: @barcodes }, includes: [:purpose, { wells: :upstream_plates }]) end |
#parent_labware ⇒ Object
19 20 21 22 23 |
# File 'app/models/robots/bed/pooling.rb', line 19 def parent_labware return [] if labware.nil? @parent_labware ||= labware.plate? ? parent_labware_of_plate : [] end |