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

rubocop:todo Style/MultilineBlockChain


192
193
194
195
196
197
198
# File 'app/models/cherrypick_task/pick_target.rb', line 192

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