Module: Robot::Generator::Behaviours::HamiltonDefault
- Included in:
- Hamilton
- Defined in:
- app/models/robot/generator/behaviours/hamilton_default.rb
Overview
Module with the file generation functionality for Hamilton robots
Constant Summary collapse
- COLUMN_HEADERS =
%w[ SourcePlateID SourceWellID SourcePlateType SourcePlateVolume DestinationPlateID DestinationWellID DestinationPlateType DestinationPlateVolume WaterVolume ].freeze
Instance Method Summary collapse
-
#mapping(data_object = picking_data) ⇒ Object
Formats values in the data object into output rows for the file.
Instance Method Details
#mapping(data_object = picking_data) ⇒ Object
Formats values in the data object into output rows for the file
18 19 20 21 22 23 24 |
# File 'app/models/robot/generator/behaviours/hamilton_default.rb', line 18 def mapping(data_object = picking_data) raise ArgumentError, 'Data object not present for Hamilton mapping' if data_object.nil? output_file_contents = [column_headers] output_file_contents << source_mappings(data_object) output_file_contents.join("\n").gsub("\n\n", "\n") end |