Class: Presenters::QcThresholdPresenter
- Inherits:
-
Object
- Object
- Presenters::QcThresholdPresenter
- Defined in:
- app/models/presenters/qc_threshold_presenter.rb
Overview
A QC threshold presenter is in charge of rendering the threshold sliders when making QC decisions. It aggregates information from the wells and the purpose configuration to present options for the selected parameters
Defined Under Namespace
Classes: Threshold
Instance Method Summary collapse
-
#initialize(plate, configuration) ⇒ QcThresholdPresenter
constructor
A new instance of QcThresholdPresenter.
- #thresholds ⇒ Object
- #value_for(qc_result) ⇒ Object
Constructor Details
#initialize(plate, configuration) ⇒ QcThresholdPresenter
Returns a new instance of QcThresholdPresenter.
149 150 151 152 |
# File 'app/models/presenters/qc_threshold_presenter.rb', line 149 def initialize(plate, configuration) @plate = plate @configuration = configuration.stringify_keys || {} end |
Instance Method Details
#thresholds ⇒ Object
154 155 156 |
# File 'app/models/presenters/qc_threshold_presenter.rb', line 154 def thresholds indexed_thresholds.values end |
#value_for(qc_result) ⇒ Object
158 159 160 |
# File 'app/models/presenters/qc_threshold_presenter.rb', line 158 def value_for(qc_result) indexed_thresholds[qc_result.key].value_for(qc_result) end |