Method: ProcMan.init
- Defined in:
- lib/proc_man.rb
.init ⇒ Object
Create a new Procfile template in the current directory root
46 47 48 49 50 51 52 53 54 55 |
# File 'lib/proc_man.rb', line 46 def init path = File.('./Procfile') if File.file?(path) raise Error, "Procfile already exists at #{path}" else template_path = File.('../../Procfile.template', __FILE__) File.open(path, 'w') { |f| f.write(File.read(template_path)) } puts "\e[32mProcfile created at #{path}" end end |