Class: Avm::SourceGenerators::Base
Class Method Summary
collapse
Instance Method Summary
collapse
#stereotype_namespace_module
Instance Method Details
#apply_template ⇒ Object
40
41
42
|
# File 'lib/avm/source_generators/base.rb', line 40
def apply_template
template.apply(self, target_path)
end
|
#assert_clear_directory ⇒ Object
35
36
37
38
|
# File 'lib/avm/source_generators/base.rb', line 35
def assert_clear_directory
target_path.mkpath
raise "\"#{target_path}\" is not empty" if target_path.children.any?
end
|
26
27
28
|
# File 'lib/avm/source_generators/base.rb', line 26
def option_list
self.class.option_list
end
|
30
31
32
33
|
# File 'lib/avm/source_generators/base.rb', line 30
def perform
assert_clear_directory
apply_template
end
|