Class: LabelPrinter::Label::BatchPlateDouble
- Inherits:
-
BasePlateDouble
- Object
- BasePlateDouble
- LabelPrinter::Label::BatchPlateDouble
- Includes:
- BatchPlates
- Defined in:
- lib/label_printer/label/batch_plate_double.rb
Instance Attribute Summary collapse
-
#batch ⇒ Object
readonly
Returns the value of attribute batch.
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#printable ⇒ Object
readonly
Returns the value of attribute printable.
Instance Method Summary collapse
- #build_extra_label(plate) ⇒ Object
- #build_label(plate) ⇒ Object
-
#initialize(options) ⇒ BatchPlateDouble
constructor
A new instance of BatchPlateDouble.
Methods included from BatchPlates
Methods inherited from BasePlateDouble
#assets, #barcode, #date_today, #plates
Methods included from MultipleDoubleLabels
Methods included from MultipleLabels
Constructor Details
#initialize(options) ⇒ BatchPlateDouble
Returns a new instance of BatchPlateDouble.
12 13 14 15 16 17 |
# File 'lib/label_printer/label/batch_plate_double.rb', line 12 def initialize() super() @count = [:count].to_i @printable = [:printable] @batch = [:batch] end |
Instance Attribute Details
#batch ⇒ Object (readonly)
Returns the value of attribute batch.
10 11 12 |
# File 'lib/label_printer/label/batch_plate_double.rb', line 10 def batch @batch end |
#count ⇒ Object (readonly)
Returns the value of attribute count.
10 11 12 |
# File 'lib/label_printer/label/batch_plate_double.rb', line 10 def count @count end |
#printable ⇒ Object (readonly)
Returns the value of attribute printable.
10 11 12 |
# File 'lib/label_printer/label/batch_plate_double.rb', line 10 def printable @printable end |
Instance Method Details
#build_extra_label(plate) ⇒ Object
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/label_printer/label/batch_plate_double.rb', line 28 def build_extra_label(plate) { left_text: date_today, right_text: # rubocop:todo Layout/LineLength "#{@batch.output_plate_role} #{@batch.output_plate_purpose.name} #{plate.} #{@batch.studies.first.abbreviation}", # rubocop:enable Layout/LineLength label_name: 'extra_label' } end |
#build_label(plate) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/label_printer/label/batch_plate_double.rb', line 19 def build_label(plate) { left_text: plate..to_s, right_text: plate..to_s, barcode: (plate), label_name: 'main_label' } end |