Class: PlatePicks::BatchesJson
- Inherits:
-
Object
- Object
- PlatePicks::BatchesJson
- Defined in:
- app/controllers/concerns/plate_picks/batches_json.rb
Overview
Translate the pick information into a format more useful for plate picks
Instance Method Summary collapse
-
#initialize(batch_id, pick_information, plate_information) ⇒ BatchesJson
constructor
A new instance of BatchesJson.
- #to_json(_ = nil) ⇒ Object
Constructor Details
#initialize(batch_id, pick_information, plate_information) ⇒ BatchesJson
Returns a new instance of BatchesJson.
5 6 7 8 9 |
# File 'app/controllers/concerns/plate_picks/batches_json.rb', line 5 def initialize(batch_id, pick_information, plate_information) @batch_id = batch_id @pick_information = pick_information @plate_information = plate_information end |
Instance Method Details
#to_json(_ = nil) ⇒ Object
11 12 13 |
# File 'app/controllers/concerns/plate_picks/batches_json.rb', line 11 def to_json(_ = nil) { batch: { id: @batch_id.to_s, picks: picks } } end |