Module: Well::AttributeUpdater
- Defined in:
- app/models/well/attribute_updater.rb
Overview
Well::AttributeUpdater provides a collection of small objects to convert a range of qc_results to legacy well_attributes
Defined Under Namespace
Classes: Base, Concentration, GenderMarkers, Rin, SnpCount, Volume
Constant Summary collapse
- HANDLER =
Hash mapping potential QCResult#key to handlers
{ 'volume' => Volume, 'snp_count' => SnpCount, 'loci_passed' => SnpCount, 'gender_markers' => GenderMarkers, 'concentration' => Concentration, 'molarity' => Concentration, 'rin' => Rin }.freeze
Class Method Summary collapse
-
.update(well, qc_result) ⇒ void
Updates the well attributes of the provided well according to the information in the qc result.
Class Method Details
.update(well, qc_result) ⇒ void
This method returns an undefined value.
Updates the well attributes of the provided well according to the information in the qc result. It automatically: - Identifies the attribute to update - Scales based on the units provided - Generates any required events
16 17 18 |
# File 'app/models/well/attribute_updater.rb', line 16 def self.update(well, qc_result) HANDLER.fetch(qc_result.key.downcase, Base).new(well, qc_result).update end |