Class: TagLayout::AsFixedGroupByPlate
- Defined in:
- app/models/tag_layout/as_fixed_group_by_plate.rb
Overview
Assigns multiple tags to each well sequentially.
Constant Summary collapse
- DEFAULT_TAGS_PER_WELL =
4
Instance Attribute Summary
Attributes inherited from Walker
Instance Method Summary collapse
-
#apply_tags(well, tag, tag2) ⇒ Object
Over-ridden in the as group by plate fixed module to allow the application of multiple tags.
- #tags_per_well ⇒ Object
- #walk_wells ⇒ Object
Methods inherited from Walker
Constructor Details
This class inherits a constructor from TagLayout::Walker
Instance Method Details
#apply_tags(well, tag, tag2) ⇒ Object
Over-ridden in the as group by plate fixed module to allow the application of multiple tags. We don’t support dual indexing here currently.
24 25 26 27 28 |
# File 'app/models/tag_layout/as_fixed_group_by_plate.rb', line 24 def (well, tag, tag2) raise StandardError, 'Dual indexing is not supported by this template' if tag2.present? tag.multitag!(well) unless well.aliquots.empty? end |
#tags_per_well ⇒ Object
9 10 11 |
# File 'app/models/tag_layout/as_fixed_group_by_plate.rb', line 9 def tag_layout. || DEFAULT_TAGS_PER_WELL end |
#walk_wells ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/models/tag_layout/as_fixed_group_by_plate.rb', line 13 def walk_wells wells_in_walking_order.each_with_index do |well, well_index| .times do |tag_index| index = (well_index * ) + tag_index yield(well, index) unless well.nil? end end end |