Class: Voicemaker::Commands::NewCommand
- Defined in:
- lib/voicemaker/commands/new_command.rb
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#config_command ⇒ Object
19 20 21 |
# File 'lib/voicemaker/commands/new_command.rb', line 19 def config_command copy_config_template args['PATH'] end |
#project_command ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/voicemaker/commands/new_command.rb', line 23 def project_command base = args['DIR'] copy_config_template "#{base}/config.yml" Dir.mkdir "#{base}/in" unless Dir.exist? "#{base}/in" Dir.mkdir "#{base}/out" unless Dir.exist? "#{base}/out" File.write "#{base}/in/sample1.txt", "hello" File.write "#{base}/in/sample2.txt", "hello" say "created in and out folders in #{base}" end |