Class: TagLayout::DualIndexWalker

Inherits:
Walker
  • Object
show all
Defined in:
app/models/tag_layout/dual_index_walker.rb

Overview

Abstract class for handling dual indexed layouts

Direct Known Subclasses

CombinatorialSequential, Quadrants

Constant Summary collapse

PLATE_SCALE =

Each row and column is essentially duplicated. So our scale is 2 (not four)

2

Instance Attribute Summary

Attributes inherited from Walker

#tag_layout

Instance Method Summary collapse

Methods inherited from Walker

#apply_tags, #initialize

Constructor Details

This class inherits a constructor from TagLayout::Walker

Instance Method Details

#walk_wellsObject


9
10
11
12
13
14
15
16
17
# File 'app/models/tag_layout/dual_index_walker.rb', line 9

def walk_wells
  wells_in_walking_order.includes(:map).find_each do |well|
    row = well.map.row
    col = well.map.column
    index = direction_helper.tag_index(row, col, PLATE_SCALE, height, width)
    index2 = direction_helper.tag2_index(row, col, PLATE_SCALE, height, width)
    yield(well, index, index2)
  end
end