Class: Avm::SourceGenerators::Base
Instance Method Summary
collapse
#stereotype_namespace_module
Instance Method Details
#apply_template ⇒ Object
24
25
26
|
# File 'lib/avm/source_generators/base.rb', line 24
def apply_template
template.apply(self, target_path)
end
|
#assert_clear_directory ⇒ Object
19
20
21
22
|
# File 'lib/avm/source_generators/base.rb', line 19
def assert_clear_directory
target_path.mkpath
raise "\"#{target_path}\" is not empty" if target_path.children.any?
end
|
14
15
16
17
|
# File 'lib/avm/source_generators/base.rb', line 14
def perform
assert_clear_directory
apply_template
end
|