Method: Configure::AskLoop.ask
- Defined in:
- lib/ngi/configure.rb
.ask(args) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/ngi/configure.rb', line 36 def self.ask(args) puts "\nChoose from: #{args[:valid]}" answer = AcceptInput.str(:stripped) loop do break if args[:check].include?(answer) puts "Choose from: #{args[:valid]}\n(or press ctrl+c to exit)" answer = AcceptInput.str(:stripped) end answer end |