Class: TagLayout::Walker
- Inherits:
-
Object
- Object
- TagLayout::Walker
- Defined in:
- app/models/tag_layout/walker.rb
Overview
A walker passes over the wells of a plate and yeilds the appropriate tag index
Direct Known Subclasses
AsFixedGroupByPlate, AsGroupByPlate, DualIndexWalker, WalkManualWellsByPools, WalkManualWellsOfPlate, WalkWellsByPools, WalkWellsOfPlate
Instance Attribute Summary collapse
-
#tag_layout ⇒ Object
readonly
Returns the value of attribute tag_layout.
Instance Method Summary collapse
-
#apply_tags(well, tag, tag2) ⇒ Object
Over-ridden in the as group by plate module to allow the application of multiple tags.
-
#initialize(tag_layout) ⇒ Walker
constructor
A new instance of Walker.
-
#walk_wells ⇒ Object
We don’t actually implement the main behaviour here.
Constructor Details
#initialize(tag_layout) ⇒ Walker
Returns a new instance of Walker.
12 13 14 |
# File 'app/models/tag_layout/walker.rb', line 12 def initialize(tag_layout) @tag_layout = tag_layout end |
Instance Attribute Details
#tag_layout ⇒ Object (readonly)
Returns the value of attribute tag_layout.
6 7 8 |
# File 'app/models/tag_layout/walker.rb', line 6 def tag_layout @tag_layout end |
Instance Method Details
#apply_tags(well, tag, tag2) ⇒ Object
Over-ridden in the as group by plate module to allow the application of multiple tags.
23 24 25 |
# File 'app/models/tag_layout/walker.rb', line 23 def (well, tag, tag2) well.(tag, tag2) unless well.aliquots.empty? end |
#walk_wells ⇒ Object
We don’t actually implement the main behaviour here. If you add a new walker, this is where you add your new behaviour
18 19 20 |
# File 'app/models/tag_layout/walker.rb', line 18 def walk_wells raise StandardError, "#{self.class.name} should implement #walk_wells" end |