Class: Robot::PickData
- Inherits:
-
Object
- Object
- Robot::PickData
- Defined in:
- app/models/robot/pick_data.rb
Overview
Builds the information about a cherrypick for a Batch
Instance Attribute Summary collapse
-
#batch ⇒ Object
readonly
Returns the value of attribute batch.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(batch, user: batch.user, max_beds: nil) ⇒ PickData
constructor
Create a pick data object.
- #picking_data_hash(target_barcode) ⇒ Object
Constructor Details
#initialize(batch, user: batch.user, max_beds: nil) ⇒ PickData
Create a pick data object
16 17 18 19 20 21 |
# File 'app/models/robot/pick_data.rb', line 16 def initialize(batch, user: batch.user, max_beds: nil) @batch = batch @user = user @max_beds = max_beds @picking_data_hash ||= Hash.new { |hash, | hash[] = generate_picking_data_hash() } end |
Instance Attribute Details
#batch ⇒ Object (readonly)
Returns the value of attribute batch.
5 6 7 |
# File 'app/models/robot/pick_data.rb', line 5 def batch @batch end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
5 6 7 |
# File 'app/models/robot/pick_data.rb', line 5 def user @user end |
Instance Method Details
#picking_data_hash(target_barcode) ⇒ Object
23 24 25 |
# File 'app/models/robot/pick_data.rb', line 23 def picking_data_hash() @picking_data_hash[] end |