Class: Terraspace::CLI::New::Helper

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/terraspace/cli/new/helper.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.optionsObject



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

def self.options
  [
    [:force, aliases: %w[y], type: :boolean, desc: "Bypass overwrite are you sure prompt for existing files"],
    [:name, desc: "Helper name used for the filename. Defaults to the project, module or stack name"],
    [:type, default: "project", desc: "project, stack or module"],
  ]
end

.source_rootObject



16
17
18
# File 'lib/terraspace/cli/new/helper.rb', line 16

def self.source_root
  File.expand_path("../../../templates/base/helper", __dir__)
end

Instance Method Details

#createObject



50
51
52
# File 'lib/terraspace/cli/new/helper.rb', line 50

def create
  directory ".", dest
end