Class: Raboot::CLI
- Inherits:
-
Thor
- Object
- Thor
- Raboot::CLI
- Defined in:
- lib/raboot/cli.rb
Constant Summary
Constants included from Version
Version::MAJOR, Version::MINOR, Version::PATCH, Version::STRING
Instance Method Summary collapse
Methods included from Utils
#rename_app, #replace_text, #validate_name?
Instance Method Details
#new(name) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/raboot/cli.rb', line 21 def new(name) if validate_name?(name) template_path = File.('~/.raboot/*') FileUtils.mkdir(name) FileUtils.cp_r(Dir.glob(template_path), name) rename_app(name) say 'Successfully generated ' + name + ' app from template' end end |