Class: Llama::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/llama/cli.rb

Instance Method Summary collapse

Instance Method Details

#new(name) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/llama/cli.rb', line 9

def new(name)
  project = Llama::Project.new(name, options.template)
  if Dir.exist?(project.path) && !options.force
    puts "#{project.path} already exists! Use --force to overwrite".red
  else
    `rm -rf #{project.path}`
    Dir.mkdir(project.path)
    project.write_template!
  end
end