Class: Cure::Generator::BaseGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/cure/generator/base_generator.rb

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

#optionsHash

Returns:

  • (Hash)


7
8
9
# File 'lib/cure/generator/base_generator.rb', line 7

def options
  @options
end

Instance Method Details

#describeObject



23
24
25
# File 'lib/cure/generator/base_generator.rb', line 23

def describe
  _describe
end

#generate(source_value, row_ctx) ⇒ String

Parameters:

  • source_value (Object/Nil)
  • row_ctx (RowCtx/Nil)

Returns:



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