Class: Cure::Transformation::Translation

Inherits:
Object
  • Object
show all
Includes:
Helpers::ObjectHelpers
Defined in:
lib/cure/transformation/candidate.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helpers::ObjectHelpers

#attributes=, #from_hash, #from_json

Instance Attribute Details

#generatorGenerator::BaseGenerator

What sort of data needs to be generated.



76
77
78
# File 'lib/cure/transformation/candidate.rb', line 76

def generator
  @generator
end

#strategyStrategy::BaseStrategy

What sort of replacement is done, full/random/lookup/partial.



72
73
74
# File 'lib/cure/transformation/candidate.rb', line 72

def strategy
  @strategy
end

Instance Method Details

#extract(source_value) ⇒ String

Parameters:

  • source_value (String)

Returns:

  • (String)


80
81
82
# File 'lib/cure/transformation/candidate.rb', line 80

def extract(source_value)
  @strategy.extract(source_value, @generator)
end