Class: Cure::Strategy::EndWithStrategy
- 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
188 189 190 191 192 193 194 195 |
# File 'lib/cure/strategy/base.rb', line 188 def _replace_value(source_value, generated_value) return unless source_value.end_with? ["match"] return generated_value unless replace_partial_record generated_value + ["match"] # generated_value + source_value.reverse.chomp(@options["match"].reverse).reverse end |
#_retrieve_value(source_value) ⇒ Object
gsub catchment group
181 182 183 |
# File 'lib/cure/strategy/base.rb', line 181 def _retrieve_value(source_value) ["match"] || nil if source_value.end_with? ["match"] end |