Class: LabelPrinter::Label::BatchPlateAmp
- Inherits:
-
Object
- Object
- LabelPrinter::Label::BatchPlateAmp
- Includes:
- MultipleLabels
- Defined in:
- lib/label_printer/label/batch_plate_amp.rb
Overview
Label for printing plates specific to the AMP step in the Ultima sequencing pipeline These particular plates don't exist as Labware in the system, we're just creating barcode labels for them, based off the batch id and parent tube barcodes.
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
Instance Method Summary collapse
-
#assets ⇒ Object
Not really assets, just identifiers for off-LIMS plates, but method name kept for compatibility with MultipleLabels module.
- #build_label(parent_tube_barcode) ⇒ Object
- #date_today ⇒ Object
-
#initialize(options) ⇒ BatchPlateAmp
constructor
A new instance of BatchPlateAmp.
- #parent_tube_barcodes ⇒ Object
- #plate_barcode(tube_barcode) ⇒ Object
Methods included from MultipleLabels
Constructor Details
#initialize(options) ⇒ BatchPlateAmp
Returns a new instance of BatchPlateAmp.
15 16 17 18 19 20 |
# File 'lib/label_printer/label/batch_plate_amp.rb', line 15 def initialize() super() @count = [:count].to_i @printable = [:printable] @batch = [:batch] end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
13 14 15 |
# File 'lib/label_printer/label/batch_plate_amp.rb', line 13 def count @count end |
Instance Method Details
#assets ⇒ Object
Not really assets, just identifiers for off-LIMS plates, but method name kept for compatibility with MultipleLabels module
49 50 51 |
# File 'lib/label_printer/label/batch_plate_amp.rb', line 49 def assets end |
#build_label(parent_tube_barcode) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/label_printer/label/batch_plate_amp.rb', line 22 def build_label() { top_left: date_today, bottom_left: (), top_right: nil, bottom_right: nil, top_far_right: nil, barcode: (), label_name: 'main_label' } end |
#date_today ⇒ Object
34 35 36 |
# File 'lib/label_printer/label/batch_plate_amp.rb', line 34 def date_today Time.zone.today.strftime('%e-%^b-%Y') end |
#parent_tube_barcodes ⇒ Object
42 43 44 45 |
# File 'lib/label_printer/label/batch_plate_amp.rb', line 42 def # comes from checkboxes selected on the page @printable.select { |, check| check == 'on' }.keys end |
#plate_barcode(tube_barcode) ⇒ Object
38 39 40 |
# File 'lib/label_printer/label/batch_plate_amp.rb', line 38 def () "#{@batch.id}-#{}" end |