Class: LabelPrinter::Label::AssetPlate

Inherits:
BasePlate
  • Object
show all
Defined in:
lib/label_printer/label_printer/label/asset_plate.rb

Instance Attribute Summary collapse

Attributes included from MultipleLabels

#count

Instance Method Summary collapse

Methods inherited from BasePlate

#assets, #barcode, #bottom_left, #create_label, #date_today, #top_far_right, #top_left

Methods included from MultipleLabels

#create_labels, #label, #labels, #to_h

Constructor Details

#initialize(plates) ⇒ AssetPlate

Returns a new instance of AssetPlate


6
7
8
# File 'lib/label_printer/label_printer/label/asset_plate.rb', line 6

def initialize(plates)
  @plates = plates
end

Instance Attribute Details

#platesObject (readonly)

Returns the value of attribute plates


4
5
6
# File 'lib/label_printer/label_printer/label/asset_plate.rb', line 4

def plates
  @plates
end

Instance Method Details

#bottom_right(plate) ⇒ Object


14
15
16
# File 'lib/label_printer/label_printer/label/asset_plate.rb', line 14

def bottom_right(plate)
  "#{plate.name_for_label} #{plate.barcode_number}"
end

#top_right(plate) ⇒ Object


10
11
12
# File 'lib/label_printer/label_printer/label/asset_plate.rb', line 10

def top_right(plate)
  "#{plate.prefix} #{plate.barcode_number}"
end