Module: InteractiveSetup::Workspace

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

Class Method Summary collapse

Class Method Details

.setupObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/git-ready/interactive_setup/workspace.rb', line 7

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