Class: LabelPrinter::Label::AssetPlateDouble
- Inherits:
-
BasePlateDouble
- Object
- BasePlateDouble
- LabelPrinter::Label::AssetPlateDouble
- Defined in:
- lib/label_printer/label/asset_plate_double.rb
Instance Attribute Summary collapse
-
#plates ⇒ Object
readonly
Returns the value of attribute plates.
Attributes included from MultipleLabels
Instance Method Summary collapse
- #build_extra_label(plate) ⇒ Object
- #build_label(plate) ⇒ Object
-
#initialize(plates) ⇒ AssetPlateDouble
constructor
A new instance of AssetPlateDouble.
Methods inherited from BasePlateDouble
#assets, #barcode, #date_today
Methods included from MultipleDoubleLabels
Methods included from MultipleLabels
Constructor Details
#initialize(plates) ⇒ AssetPlateDouble
Returns a new instance of AssetPlateDouble.
10 11 12 13 |
# File 'lib/label_printer/label/asset_plate_double.rb', line 10 def initialize(plates) super() @plates = plates end |
Instance Attribute Details
#plates ⇒ Object (readonly)
Returns the value of attribute plates.
8 9 10 |
# File 'lib/label_printer/label/asset_plate_double.rb', line 8 def plates @plates end |
Instance Method Details
#build_extra_label(plate) ⇒ Object
24 25 26 |
# File 'lib/label_printer/label/asset_plate_double.rb', line 24 def build_extra_label(plate) { left_text: date_today, right_text: plate.purpose.name, label_name: 'extra_label' } end |
#build_label(plate) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/label_printer/label/asset_plate_double.rb', line 15 def build_label(plate) { left_text: plate., right_text: "#{plate.prefix} #{plate.}", barcode: (plate), label_name: 'main_label' } end |