Class: Presenters::QcThresholdPresenter

Inherits:
Object
  • Object
show all
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

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

#thresholdsObject



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