class Confirmator
Public Class Methods
confirm(question:, exit_message: 'Exiting without destroying the resource')
click to toggle source
# File lib/busbar_cli/helpers/confirmator.rb, line 3 def confirm(question:, exit_message: 'Exiting without destroying the resource') puts question + "\n(Y/N)" input = STDIN.gets.chomp return if input.downcase[0] == 'y' puts exit_message exit 0 end