Class: Cure::Transformation::Translation

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ObjectHelpers

#attributes=, #from_hash, #from_json

Instance Attribute Details

#generatorGenerator::Base

What sort of data needs to be generated.

Returns:



64
65
66
# File 'lib/cure/transformation/candidate.rb', line 64

def generator
  @generator
end

#strategyStrategy::Base

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

Returns:



60
61
62
# File 'lib/cure/transformation/candidate.rb', line 60

def strategy
  @strategy
end

Instance Method Details

#extract(source_value) ⇒ String

Parameters:

  • source_value (String)

Returns:

  • (String)


68
69
70
# File 'lib/cure/transformation/candidate.rb', line 68

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