Module: InteractiveSetup::Workspace

Defined in:
lib/git-ready/interactive_setup.rb

Class Method Summary collapse

Class Method Details

.setupObject



38
39
40
41
42
43
44
45
46
47
48
# File 'lib/git-ready/interactive_setup.rb', line 38

def self.setup
  path = ask 'Enter the path to your workspace.'
  actual_path = File.expand_path path
  Announce.warning "No path given, assuming #{actual_path}" if path.empty?
  if Dir.exist? actual_path
    actual_path
  else
    Announce.failure 'Directory does not exist.'
    setup
  end
end