Class: Robots::Bed::Invalid
- Inherits:
-
Object
- Object
- Robots::Bed::Invalid
- Defined in:
- app/models/robots/bed/invalid.rb
Overview
Generated when an unrecognised bed barcode is scanned
Instance Method Summary collapse
- #formatted_message ⇒ Object
-
#initialize(barcode) ⇒ Invalid
constructor
A new instance of Invalid.
- #label ⇒ Object
- #load(_plate_barcodes) ⇒ Object
- #plate ⇒ Object
- #recognised? ⇒ Boolean
- #valid? ⇒ Boolean
Constructor Details
#initialize(barcode) ⇒ Invalid
Returns a new instance of Invalid.
6 7 8 |
# File 'app/models/robots/bed/invalid.rb', line 6 def initialize() @barcode = end |
Instance Method Details
#formatted_message ⇒ Object
20 21 22 23 24 25 26 |
# File 'app/models/robots/bed/invalid.rb', line 20 def if "Bed with barcode #{@barcode} is not expected to contain a tracked plate." else "#{@barcode} does not appear to be a valid bed barcode." end end |
#label ⇒ Object
16 17 18 |
# File 'app/models/robots/bed/invalid.rb', line 16 def label "Invalid bed: #{@barcode}" end |
#load(_plate_barcodes) ⇒ Object
10 |
# File 'app/models/robots/bed/invalid.rb', line 10 def load(); end |
#plate ⇒ Object
12 13 14 |
# File 'app/models/robots/bed/invalid.rb', line 12 def plate nil end |
#recognised? ⇒ Boolean
28 29 30 |
# File 'app/models/robots/bed/invalid.rb', line 28 def recognised? false end |
#valid? ⇒ Boolean
32 33 34 |
# File 'app/models/robots/bed/invalid.rb', line 32 def valid? false end |