Class: Dok::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/dok/cli.rb

Instance Method Summary collapse

Instance Method Details

#initObject


8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/dok/cli.rb', line 8

def init
  config = Application.new.config

  if config.base_directory_exists?
    say "#{config.path} is already exists", :red
  else
    begin
      config.create_directories
      config.touch
      say "OK", :green
    rescue e
      say e.message, :red
    end
  end
end