Class: Utility::CommonDilutionCalculations::Compressor
- Inherits:
-
Object
- Object
- Utility::CommonDilutionCalculations::Compressor
- Defined in:
- app/models/utility/common_dilution_calculations.rb
Overview
Class used by calculators that need to compress wells to top left. Handles the determination of the next well location.
Instance Attribute Summary collapse
-
#column ⇒ Object
Returns the value of attribute column.
-
#row ⇒ Object
Returns the value of attribute row.
Instance Method Summary collapse
-
#initialize(number_of_rows) ⇒ Compressor
constructor
Sets up an instance of the Compressor class for a plate.
-
#next_well_location ⇒ Object
Work out what the next well location will be.
Constructor Details
#initialize(number_of_rows) ⇒ Compressor
Sets up an instance of the Compressor class for a plate.
240 241 242 243 244 245 |
# File 'app/models/utility/common_dilution_calculations.rb', line 240 def initialize(number_of_rows) @number_of_rows = number_of_rows @row = 0 @column = 0 validate_initial_arguments end |
Instance Attribute Details
#column ⇒ Object
Returns the value of attribute column.
233 234 235 |
# File 'app/models/utility/common_dilution_calculations.rb', line 233 def column @column end |
#row ⇒ Object
Returns the value of attribute row.
233 234 235 |
# File 'app/models/utility/common_dilution_calculations.rb', line 233 def row @row end |
Instance Method Details
#next_well_location ⇒ Object
Work out what the next well location will be. This depends on whether we are in the last row of the plate and will need to start a new column. NB. rows and columns are zero-based here.
254 255 256 |
# File 'app/models/utility/common_dilution_calculations.rb', line 254 def next_well_location determine_next_available_location end |