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