Class: CherrypickTask::PickTarget::ByRow

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

Overview

Deals with generating the pick plate by travelling in a row direction, so A1, A2, A3 …

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



172
173
174
175
176
177
178
179
180
181
# File 'app/models/cherrypick_task/pick_target.rb', line 172

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