Class: Completely::Commands::Init

Inherits:
Base
  • Object
show all
Defined in:
lib/completely/commands/init.rb

Instance Method Summary collapse

Methods inherited from Base

environment_config_path, environment_debug, option_function, param_config_path

Instance Method Details

#runObject

Raises:



16
17
18
19
20
21
# File 'lib/completely/commands/init.rb', line 16

def run
  raise Error, "File already exists: #{config_path}" if File.exist? config_path

  File.write config_path, sample
  say "Saved m`#{config_path}`"
end