Module: ExitView

Defined in:
lib/views/exit_view.rb

Class Method Summary collapse

Class Method Details

.showObject



2
3
4
5
6
7
8
9
# File 'lib/views/exit_view.rb', line 2

def show
    Sound.new("lib/media/swluke01.wav").play
    to_exit = TTY::Prompt.new.select("Are you sure you want to exit?".colorize(:light_yellow), help: '') do |menu|
        menu.choice "Yes".colorize(:light_green), true
        menu.choice "No".colorize(:light_red), false
    end
    to_exit == true ? exit : to_exit
end