Class: Skeletor::CLI
- Inherits:
-
Thor
- Object
- Thor
- Skeletor::CLI
- Defined in:
- lib/skeletor/cli.rb
Instance Method Summary collapse
Instance Method Details
#build(template) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/skeletor/cli.rb', line 14 def build(template) path = [:directory] || Dir.pwd project = [:project] || File.basename(path) skeleton = Builder.new(project,template,path) skeleton.build end |
#clean ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/skeletor/cli.rb', line 26 def clean print 'Are you sure you want to clean this project directory? (Y|n): ' confirm = gets.chomp if confirm != 'Y' && confirm != 'n' puts 'Please enter Y or n' elsif confirm == 'Y' path = [:directory] || Dir.pwd Builder.clean path end end |