Class: Well::AttributeUpdater::GenderMarkers

Inherits:
Base
  • Object
show all
Defined in:
app/models/well/attribute_updater.rb

Overview

Update the gender markers and generate events

Instance Attribute Summary

Attributes inherited from Base

#qc_result, #well

Instance Method Summary collapse

Methods inherited from Base

#initialize, #original_value, #resource

Constructor Details

This class inherits a constructor from Well::AttributeUpdater::Base

Instance Method Details

#target_valueObject


96
97
98
# File 'app/models/well/attribute_updater.rb', line 96

def target_value
  value.each_char.map { |c| c == 'U' ? 'Unknown' : c }
end

#updateObject


100
101
102
# File 'app/models/well/attribute_updater.rb', line 100

def update
  well.update_gender_markers!(target_value, resource)
end