Class: Cure::Strategy::StartWithStrategy
- Defined in:
- lib/cure/strategy/base.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #_replace_value(source_value, generated_value) ⇒ String
-
#_retrieve_value(source_value) ⇒ Object
gsub catchment group.
Methods inherited from Base
Methods included from History
#history, #reset_history, #retrieve_history, #store_history
Constructor Details
This class inherits a constructor from Cure::Strategy::Base
Instance Method Details
#_replace_value(source_value, generated_value) ⇒ String
168 169 170 171 172 173 174 175 |
# File 'lib/cure/strategy/base.rb', line 168 def _replace_value(source_value, generated_value) return unless source_value.start_with? @options["match"] return generated_value unless replace_partial_record @options["match"] + generated_value # source_value.chomp(@options["match"]) + generated_value end |
#_retrieve_value(source_value) ⇒ Object
gsub catchment group
161 162 163 |
# File 'lib/cure/strategy/base.rb', line 161 def _retrieve_value(source_value) @options["match"] || nil if source_value.start_with? @options["match"] end |