Class: RobotProperty
Instance Method Summary
collapse
alias_association, convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!
Methods included from Squishify
extended
Instance Method Details
#barcode ⇒ Object
20
21
22
23
24
|
# File 'app/models/robot_property.rb', line 20
def barcode
return nil unless name.nil?
value.to_i
end
|
#ean13_barcode ⇒ Object
7
8
9
10
11
12
|
# File 'app/models/robot_property.rb', line 7
def ean13_barcode
if name.nil?
str = Barcode.calculate_barcode('BD', value.to_i).to_s
str.length == 12 ? '0' + str : str
end
end
|
#human_barcode ⇒ Object
14
15
16
17
18
|
# File 'app/models/robot_property.rb', line 14
def human_barcode
return nil unless name.nil?
'BD' + value.to_s + Barcode.calculate_checksum('BD', value.to_i)
end
|
#sti_type ⇒ Object
26
27
28
|
# File 'app/models/robot_property.rb', line 26
def sti_type
self.class
end
|