Class: RobotProperty
Overview
rubocop:todo Style/Documentation
Instance Method Summary
collapse
convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!
Methods included from Squishify
extended
#broadcast, included, #queue_associated_for_broadcast, #queue_for_broadcast, #warren
Instance Method Details
#barcode ⇒ Object
25
26
27
28
29
|
# File 'app/models/robot_property.rb', line 25
def barcode
return nil unless name.nil?
value.to_i
end
|
#ean13_barcode ⇒ Object
8
9
10
11
12
13
14
15
16
17
|
# File 'app/models/robot_property.rb', line 8
def ean13_barcode
if name.nil?
str = Barcode.calculate_barcode('BD', value.to_i).to_s
if str.length == 12
'0' + str
else
str
end
end
end
|
#human_barcode ⇒ Object
19
20
21
22
23
|
# File 'app/models/robot_property.rb', line 19
def human_barcode
return nil unless name.nil?
'BD' + value.to_s + Barcode.calculate_checksum('BD', value.to_i)
end
|
#sti_type ⇒ Object
31
32
33
|
# File 'app/models/robot_property.rb', line 31
def sti_type
self.class
end
|