Class: Presenters::ConcentrationBinnedPlatePresenter
- Inherits:
-
PlatePresenter
- Object
- PlatePresenter
- Presenters::ConcentrationBinnedPlatePresenter
- Includes:
- Statemachine::Standard
- Defined in:
- app/models/presenters/concentration_binned_plate_presenter.rb
Overview
The ConcentrationBinnedPlatePresenter is used for plates that have had concentration binning applied. It shows a view of the plate with colours and keys indicating the various bins.
Constant Summary collapse
- PLATE_WITH_QC_RESULTS_INCLUDES =
'wells.aliquots,wells.qc_results'
Instance Method Summary collapse
- #bin_details ⇒ Object
- #bins_key ⇒ Object
- #dilutions_calculator ⇒ Object
- #dilutions_config ⇒ Object
- #plate_with_qc_results ⇒ Object
Instance Method Details
#bin_details ⇒ Object
36 37 38 |
# File 'app/models/presenters/concentration_binned_plate_presenter.rb', line 36 def bin_details @bin_details ||= compute_bin_details end |
#bins_key ⇒ Object
27 28 29 |
# File 'app/models/presenters/concentration_binned_plate_presenter.rb', line 27 def bins_key dilutions_calculator.bins_template end |
#dilutions_calculator ⇒ Object
23 24 25 |
# File 'app/models/presenters/concentration_binned_plate_presenter.rb', line 23 def dilutions_calculator @dilutions_calculator ||= Utility::ConcentrationBinningCalculator.new(dilutions_config) end |
#dilutions_config ⇒ Object
19 20 21 |
# File 'app/models/presenters/concentration_binned_plate_presenter.rb', line 19 def dilutions_config purpose_config.fetch(:dilutions) end |
#plate_with_qc_results ⇒ Object
31 32 33 34 |
# File 'app/models/presenters/concentration_binned_plate_presenter.rb', line 31 def plate_with_qc_results @plate_with_qc_results ||= Sequencescape::Api::V2.plate_with_custom_includes(PLATE_WITH_QC_RESULTS_INCLUDES, uuid: labware.uuid) end |