module ExitView

Public Class Methods

show() click to toggle source
# 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

Private Instance Methods

show() click to toggle source
# 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