Class: Cure::Transformation::Translation
- Inherits:
-
Object
- Object
- Cure::Transformation::Translation
- Includes:
- Helpers::ObjectHelpers
- Defined in:
- lib/cure/transformation/candidate.rb
Instance Attribute Summary collapse
-
#generator ⇒ Generator::BaseGenerator
readonly
What sort of data needs to be generated.
-
#strategy ⇒ Strategy::BaseStrategy
readonly
What sort of replacement is done, full/random/lookup/partial.
Instance Method Summary collapse
- #extract(source_value, row_ctx) ⇒ String
-
#initialize(strategy, generator) ⇒ Translation
constructor
A new instance of Translation.
Methods included from Helpers::ObjectHelpers
Constructor Details
#initialize(strategy, generator) ⇒ Translation
Returns a new instance of Translation.
85 86 87 88 |
# File 'lib/cure/transformation/candidate.rb', line 85 def initialize(strategy, generator) @strategy = strategy @generator = generator end |
Instance Attribute Details
#generator ⇒ Generator::BaseGenerator (readonly)
What sort of data needs to be generated.
83 84 85 |
# File 'lib/cure/transformation/candidate.rb', line 83 def generator @generator end |
#strategy ⇒ Strategy::BaseStrategy (readonly)
What sort of replacement is done, full/random/lookup/partial.
79 80 81 |
# File 'lib/cure/transformation/candidate.rb', line 79 def strategy @strategy end |
Instance Method Details
#extract(source_value, row_ctx) ⇒ String
92 93 94 |
# File 'lib/cure/transformation/candidate.rb', line 92 def extract(source_value, row_ctx) @strategy.extract(source_value, row_ctx, @generator) end |