Class: DCA::CLI

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/dca/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



7
8
9
# File 'lib/dca/cli.rb', line 7

def self.source_root
  File.expand_path('../commands/templates', __FILE__)
end

Instance Method Details

#configObject



12
13
14
15
# File 'lib/dca/cli.rb', line 12

def config
  empty_directory 'config'
  template 'config.yml.erb', 'config/config.yml'
end

#installObject



21
22
23
24
# File 'lib/dca/cli.rb', line 21

def install
  project = "#{DCA.project_name}::Project".constantize
  project.install
end

#uninstallObject



27
28
29
30
# File 'lib/dca/cli.rb', line 27

def uninstall
  project = "#{DCA.project_name}::Project".constantize
  project.remove
end