module InteractiveSetup::Workspace

Public Class Methods

setup() click to toggle source
# 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