Class: LabelPrinter::Label::AssetPlateDouble
- Inherits:
-
BasePlateDouble
- Object
- BasePlateDouble
- LabelPrinter::Label::AssetPlateDouble
- Defined in:
- lib/label_printer/label_printer/label/asset_plate_double.rb
Overview
rubocop:todo Style/Documentation
Instance Attribute Summary collapse
-
#plates ⇒ Object
readonly
Returns the value of attribute plates.
Attributes included from MultipleLabels
Instance Method Summary collapse
- #create_extra_label(plate) ⇒ Object
- #create_label(plate) ⇒ Object
-
#initialize(plates) ⇒ AssetPlateDouble
constructor
A new instance of AssetPlateDouble.
Methods inherited from BasePlateDouble
#assets, #barcode, #date_today
Methods included from MultipleDoubleLabels
#create_labels, #double_label, #extra_label
Methods included from MultipleLabels
#create_labels, #label, #labels, #to_h
Constructor Details
#initialize(plates) ⇒ AssetPlateDouble
Returns a new instance of AssetPlateDouble.
10 11 12 |
# File 'lib/label_printer/label_printer/label/asset_plate_double.rb', line 10 def initialize(plates) @plates = plates end |
Instance Attribute Details
#plates ⇒ Object (readonly)
Returns the value of attribute plates
8 9 10 |
# File 'lib/label_printer/label_printer/label/asset_plate_double.rb', line 8 def plates @plates end |
Instance Method Details
#create_extra_label(plate) ⇒ Object
20 21 22 23 |
# File 'lib/label_printer/label_printer/label/asset_plate_double.rb', line 20 def create_extra_label(plate) { left_text: date_today, right_text: plate.purpose.name } end |
#create_label(plate) ⇒ Object
14 15 16 17 18 |
# File 'lib/label_printer/label_printer/label/asset_plate_double.rb', line 14 def create_label(plate) { left_text: plate., right_text: "#{plate.prefix} #{plate.}", barcode: (plate) } end |