Class: FluidigmTemplateTask

Inherits:
PlateTemplateTask show all
Defined in:
app/models/fluidigm_template_task.rb

Overview

rubocop:todo Style/Documentation

Instance Method Summary collapse

Methods inherited from PlateTemplateTask

#do_task, #render_task

Methods inherited from Task

#do_task, #find_batch, #find_batch_requests, #get_descriptor_value, #get_subclass_attribute_options, get_subclass_attribute_options, #get_subclass_attribute_value, get_subclass_attributes, #get_subclass_attributes, #included_for_do_task, #included_for_render_task, init_class, #render_task, #set_descriptor_value, set_subclass_attribute, #set_subclass_attribute_value, #sub_events_for

Methods inherited from ApplicationRecord

convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!

Methods included from Squishify

extended

Methods included from Warren::BroadcastMessages

#broadcast, included, #queue_associated_for_broadcast, #queue_for_broadcast, #warren

Instance Method Details

#partialObject


2
3
4
# File 'app/models/fluidigm_template_task.rb', line 2

def partial
  'fluidigm_template_batches'
end

#plate_purpose_options(batch) ⇒ Object


6
7
8
9
10
11
12
13
14
15
# File 'app/models/fluidigm_template_task.rb', line 6

def plate_purpose_options(batch)
  requests       = batch.requests.flat_map(&:next_requests)
  plate_purposes = requests.map(&:request_type).compact.uniq.map(&:acceptable_plate_purposes).flatten.uniq
  if plate_purposes.empty?
    plate_purposes = batch.requests.map do |r|
      r..target_purpose
    end.compact.uniq
  end # Fallback situation for the moment
  plate_purposes.map { |p| [p.name, p.size, p.id] }.sort
end