Class: Labels::PlateLabelLtnAlLib
- Inherits:
-
PlateLabelBase
- Object
- PlateLabelBase
- Labels::PlateLabelLtnAlLib
- Defined in:
- app/models/labels/plate_label_ltn_al_lib.rb
Overview
Plate label class to print off the QC and intermediate plates from the LTN Al Lib plate. Very specific to this particular pipeline and plate purpose. Maybe if we get more like this consider refactoring into something more flexible that can use configuration from the plate purpose to determine what to print.
Instance Method Summary collapse
-
#additional_label_definitions ⇒ Object
rubocop:disable Metrics/AbcSize Define the 3 labels for the immediate child plates (NB. reverse order so printed in correct sequence).
- #attributes ⇒ Object
-
#qc_label_definitions ⇒ Object
NB.
Instance Method Details
#additional_label_definitions ⇒ Object
rubocop:disable Metrics/AbcSize Define the 3 labels for the immediate child plates (NB. reverse order so printed in correct sequence)
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'app/models/labels/plate_label_ltn_al_lib.rb', line 14 def additional_label_definitions [ { top_left: date_today, bottom_left: labware..human, top_right: labware.stock_plate&.&.human, bottom_right: [labware.role, 'LTN Lig'].compact.join(' '), barcode: [labware..human, 'LIG'].compact.join('-') }, { top_left: date_today, bottom_left: labware..human, top_right: labware.stock_plate&.&.human, bottom_right: [labware.role, 'LTN A-tail'].compact.join(' '), barcode: [labware..human, 'ATL'].compact.join('-') }, { top_left: date_today, bottom_left: labware..human, top_right: labware.stock_plate&.&.human, bottom_right: [labware.role, 'LTN Frag'].compact.join(' '), barcode: [labware..human, 'FRG'].compact.join('-') } ] end |
#attributes ⇒ Object
8 9 10 |
# File 'app/models/labels/plate_label_ltn_al_lib.rb', line 8 def attributes super.merge(barcode: labware..human) end |
#qc_label_definitions ⇒ Object
NB. reverse order so printed in correct sequence
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'app/models/labels/plate_label_ltn_al_lib.rb', line 41 def qc_label_definitions [ { top_left: date_today, bottom_left: "#{labware..human} QC3", top_right: labware.stock_plate&.&.human, barcode: [labware..human, 'QC3'].compact.join('-') }, { top_left: date_today, bottom_left: "#{labware..human} QC2", top_right: labware.stock_plate&.&.human, barcode: [labware..human, 'QC2'].compact.join('-') }, { top_left: date_today, bottom_left: "#{labware..human} QC1", top_right: labware.stock_plate&.&.human, barcode: [labware..human, 'QC1'].compact.join('-') } ] end |