Class: CherrypickTask::PickTarget::ByInterlacedColumn

Inherits:
Base
  • Object
show all
Defined in:
app/models/cherrypick_task/pick_target.rb

Overview

Deals with generating the pick plate by travelling in an interlaced column direction, so A1, C1, E1 …

Instance Attribute Summary

Attributes inherited from Base

#size

Instance Method Summary collapse

Methods inherited from Base

#add_any_consecutive_control_requests, #add_any_initial_control_requests, #add_control_request, #add_remaining_control_requests, #content, #create_control_requests!, #empty?, #full?, #initialize, #push, #push_with_controls, #remaining_wells

Constructor Details

This class inherits a constructor from CherrypickTask::PickTarget::Base

Instance Method Details

#completed_viewObject



203
204
205
206
207
208
209
210
211
212
# File 'app/models/cherrypick_task/pick_target.rb', line 203

def completed_view
  @wells
    .dup
    .tap { |wells| complete(wells) }
    .each_with_index
    .inject([]) do |wells, (well, index)|
      wells.tap { wells[@shape.vertical_to_interlaced_vertical(index + 1, @size)] = well }
    end
    .compact
end