Class: LabelPrinter::Label::BasePlate
- Inherits:
-
Object
- Object
- LabelPrinter::Label::BasePlate
show all
- Includes:
- MultipleLabels
- Defined in:
- lib/label_printer/label/base_plate.rb
Instance Attribute Summary
#count
Instance Method Summary
collapse
#create_labels, #labels
Instance Method Details
#assets ⇒ Object
48
49
50
|
# File 'lib/label_printer/label/base_plate.rb', line 48
def assets
plates
end
|
#barcode(plate) ⇒ Object
36
37
38
|
# File 'lib/label_printer/label/base_plate.rb', line 36
def barcode(plate)
plate.machine_barcode
end
|
#bottom_left(plate) ⇒ Object
23
24
25
|
# File 'lib/label_printer/label/base_plate.rb', line 23
def bottom_left(plate)
plate.human_barcode
end
|
#bottom_right(plate) ⇒ Object
30
31
|
# File 'lib/label_printer/label/base_plate.rb', line 30
def bottom_right(plate)
end
|
#build_label(plate) ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/label_printer/label/base_plate.rb', line 7
def build_label(plate)
{
top_left: top_left,
bottom_left: bottom_left(plate),
top_right: top_right(plate),
bottom_right: bottom_right(plate),
top_far_right: top_far_right(plate),
barcode: barcode(plate),
label_name: 'main_label'
}
end
|
#date_today ⇒ Object
40
41
42
|
# File 'lib/label_printer/label/base_plate.rb', line 40
def date_today
Time.zone.today.strftime('%e-%^b-%Y')
end
|
#plates ⇒ Object
44
45
46
|
# File 'lib/label_printer/label/base_plate.rb', line 44
def plates
@plates || []
end
|
#top_far_right(plate) ⇒ Object
33
34
|
# File 'lib/label_printer/label/base_plate.rb', line 33
def top_far_right(plate)
end
|
#top_left ⇒ Object
19
20
21
|
# File 'lib/label_printer/label/base_plate.rb', line 19
def top_left
date_today
end
|
#top_right(plate) ⇒ Object
27
28
|
# File 'lib/label_printer/label/base_plate.rb', line 27
def top_right(plate)
end
|