Method: Voodoo::Commands#get_path

Defined in:
lib/voodoo/commands.rb

#get_path(prompt) ⇒ Object

TODO: change this so that you can specify the root of a drive



90
91
92
93
94
95
# File 'lib/voodoo/commands.rb', line 90

def get_path(prompt)
  ask("#{prompt}: ") do |q|
    q.validate = %r=^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w ]*))=
    q.responses[:not_valid] = "Please enter a valid folder path."
  end
end