Class: Robot::Generator::Base
- Inherits:
-
Object
- Object
- Robot::Generator::Base
- Defined in:
- app/models/robot/generator/base.rb
Overview
Base class for handling generation of robot picking files for a batch plate
Instance Attribute Summary collapse
-
#batch ⇒ Object
readonly
Returns the value of attribute batch.
-
#ctrl_barcode_index ⇒ Object
readonly
Returns the value of attribute ctrl_barcode_index.
-
#dest_barcode_index ⇒ Object
readonly
Returns the value of attribute dest_barcode_index.
-
#picking_data ⇒ Object
readonly
Returns the value of attribute picking_data.
-
#plate_barcode ⇒ Object
readonly
Returns the value of attribute plate_barcode.
-
#source_barcode_index ⇒ Object
readonly
Returns the value of attribute source_barcode_index.
Instance Method Summary collapse
-
#initialize(batch: nil, plate_barcode: nil, picking_data: nil, layout: nil, total_volume: nil) ⇒ Base
constructor
A new instance of Base.
- #total_volume ⇒ Object
-
#type ⇒ Object
The MIME type of the generated file.
Constructor Details
#initialize(batch: nil, plate_barcode: nil, picking_data: nil, layout: nil, total_volume: nil) ⇒ Base
Returns a new instance of Base.
7 8 9 10 11 12 13 |
# File 'app/models/robot/generator/base.rb', line 7 def initialize(batch: nil, plate_barcode: nil, picking_data: nil, layout: nil, total_volume: nil) @batch = batch @plate_barcode = @picking_data = picking_data @dest_barcode_index, @source_barcode_index, @ctrl_barcode_index = layout @total_volume = total_volume end |
Instance Attribute Details
#batch ⇒ Object (readonly)
Returns the value of attribute batch.
5 6 7 |
# File 'app/models/robot/generator/base.rb', line 5 def batch @batch end |
#ctrl_barcode_index ⇒ Object (readonly)
Returns the value of attribute ctrl_barcode_index.
5 6 7 |
# File 'app/models/robot/generator/base.rb', line 5 def @ctrl_barcode_index end |
#dest_barcode_index ⇒ Object (readonly)
Returns the value of attribute dest_barcode_index.
5 6 7 |
# File 'app/models/robot/generator/base.rb', line 5 def @dest_barcode_index end |
#picking_data ⇒ Object (readonly)
Returns the value of attribute picking_data.
5 6 7 |
# File 'app/models/robot/generator/base.rb', line 5 def picking_data @picking_data end |
#plate_barcode ⇒ Object (readonly)
Returns the value of attribute plate_barcode.
5 6 7 |
# File 'app/models/robot/generator/base.rb', line 5 def @plate_barcode end |
#source_barcode_index ⇒ Object (readonly)
Returns the value of attribute source_barcode_index.
5 6 7 |
# File 'app/models/robot/generator/base.rb', line 5 def @source_barcode_index end |
Instance Method Details
#total_volume ⇒ Object
15 16 17 |
# File 'app/models/robot/generator/base.rb', line 15 def total_volume @total_volume ||= @batch&.total_volume_to_cherrypick.to_i end |
#type ⇒ Object
The MIME type of the generated file.
20 21 22 |
# File 'app/models/robot/generator/base.rb', line 20 def type 'text/plain' end |