Class: Terraspace::CLI::New::Module

Inherits:
Sequence
  • Object
show all
Defined in:
lib/terraspace/cli/new/module.rb

Instance Method Summary collapse

Methods inherited from Sequence

base_options, component_options

Methods included from Util::Logging

#logger

Instance Method Details

#create_moduleObject



7
8
9
10
11
12
13
# File 'lib/terraspace/cli/new/module.rb', line 7

def create_module
  puts "=> Creating new module called #{name}"
  plugin_template_source(@options[:lang], "module") # IE: plugin_template_source("hcl", "module")
  dest = "app/modules/#{name}"
  dest = "#{@options[:project_name]}/#{dest}" if @options[:project_name]
  directory ".", dest
end