Method: Fincop::CLI#init
- Defined in:
- lib/fincop/cli.rb
#init(args) ⇒ Object
36 37 38 39 40 41 |
# File 'lib/fincop/cli.rb', line 36 def init(args) raise 'usage: fincop init' unless args.empty? template_path = File.('../../templates', __dir__) puts "#{File.exist?(CONFIG_FILE_NAME) ? "overwrite" : "create"} #{CONFIG_FILE_NAME}" FileUtils.copy_file(File.join(template_path, CONFIG_FILE_NAME), CONFIG_FILE_NAME) end |