Class: UatActions::GeneratePlates
- Inherits:
-
UatActions
- Object
- UatActions
- UatActions::GeneratePlates
- Defined in:
- app/uat_actions/uat_actions/generate_plates.rb
Overview
Will construct plates with well_count wells filled with samples
Direct Known Subclasses
Constant Summary
Constants inherited from UatActions
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from UatActions
all, category, find, form_field, form_fields, #form_fields, grouped_and_sorted_uat_actions, id, inherited, permitted, #report, #save, to_partial_path, uat_actions
Class Method Details
.default ⇒ Object
51 52 53 54 55 56 57 58 59 60 |
# File 'app/uat_actions/uat_actions/generate_plates.rb', line 51 def self.default new( plate_count: 1, well_count: 96, number_of_samples_in_each_well: 1, study_name: UatActions::StaticRecords.study.name, plate_purpose_name: PlatePurpose.stock_plate_purpose.name, well_layout: 'Column' ) end |
Instance Method Details
#perform ⇒ Object
62 63 64 65 66 67 68 69 70 71 |
# File 'app/uat_actions/uat_actions/generate_plates.rb', line 62 def perform plate_count.to_i.times do |i| plate_purpose.create!.tap do |plate| construct_wells(plate) report["plate_#{i}"] = plate. yield plate if block_given? end end true end |