Class: Moonshot::Commands::New

Inherits:
Moonshot::Command show all
Defined in:
lib/moonshot/commands/new.rb

Constant Summary collapse

DEFAULT_DIRECTORY =
File.join(__dir__, '..', '..', 'default').freeze

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Moonshot::Command

inherited, #parser

Class Method Details

.run!(application_name) ⇒ Object



14
15
16
17
18
19
20
21
22
23
# File 'lib/moonshot/commands/new.rb', line 14

def run!(application_name)
  @application_name = application_name

  create_project_dir
  copy_defaults
  create_file(parameter_path)
  create_file(template_path)
  fill_moonfile
  print_success_message
end

Instance Method Details

#executeObject



9
10
11
# File 'lib/moonshot/commands/new.rb', line 9

def execute
  warn 'Looks like your project is already set up!'
end