Class: LabelPrinter::Label::RobotBeds

Inherits:
BasePlate
  • Object
show all
Defined in:
lib/label_printer/label_printer/label/robot_beds.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(beds) ⇒ RobotBeds

Returns a new instance of RobotBeds


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

def initialize(beds)
  @plates = beds
end

Instance Attribute Details

#platesObject (readonly)

Returns the value of attribute plates


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

def plates
  @plates
end

Instance Method Details

#bottom_right(bed) ⇒ Object


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

def bottom_right(bed)
  (bed.ean13_barcode).to_s
end

#top_right(bed) ⇒ Object


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

def top_right(bed)
  "Bed #{bed.barcode}"
end