Class: Cure::Generator::BaseGenerator
- Inherits:
-
Object
- Object
- Cure::Generator::BaseGenerator
show all
- Defined in:
- lib/cure/generator/base_generator.rb
Direct Known Subclasses
CaseGenerator, CharacterGenerator, ErbGenerator, EvalGenerator, FakerGenerator, GuidGenerator, HexGenerator, NumberGenerator, PlaceholderGenerator, ProcGenerator, RedactGenerator, StaticGenerator, VariableGenerator
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(options = {}) ⇒ BaseGenerator
Returns a new instance of BaseGenerator.
9
10
11
|
# File 'lib/cure/generator/base_generator.rb', line 9
def initialize(options={})
@options = options
end
|
Instance Attribute Details
#options ⇒ Hash
7
8
9
|
# File 'lib/cure/generator/base_generator.rb', line 7
def options
@options
end
|
Instance Method Details
#describe ⇒ Object
23
24
25
|
# File 'lib/cure/generator/base_generator.rb', line 23
def describe
_describe
end
|
#generate(source_value, row_ctx) ⇒ String
16
17
18
19
20
21
|
# File 'lib/cure/generator/base_generator.rb', line 16
def generate(source_value, row_ctx)
translated = _generate(source_value, row_ctx)
translated = "#{prefix}#{translated}" if prefix
translated = "#{translated}#{suffix}" if suffix
translated
end
|