Method: Kennel::Utils.ask
- Defined in:
- lib/kennel/utils.rb
.ask(question) ⇒ Object
44 45 46 47 48 49 50 51 52 |
# File 'lib/kennel/utils.rb', line 44 def ask(question) Kennel.err.printf color(:red, "#{question} - press 'y' to continue: ") begin STDIN.gets.chomp == "y" rescue Interrupt # do not show a backtrace if user decides to Ctrl+C here Kennel.err.print "\n" exit 1 end end |