class CoffeeBreak::CLI
Public Instance Methods
exit_program()
click to toggle source
# File lib/cli.rb, line 41 def exit_program puts " " puts "Thanks for stopping by. Until next time!" puts " " exit end
greeting()
click to toggle source
# File lib/cli.rb, line 32 def greeting puts "Welcome to PlayerOneCoffee! Spill the beans, what would you like?" puts "☕️" puts "Enter the number you'd like to know more about." puts "Or type exit to stop the program." puts " " end
loading_message()
click to toggle source
# File lib/cli.rb, line 20 def loading_message puts "Brewing coffee..." # Loading message before program starts puts "Grabbing favourite mug..." puts "Pouring into the mug..." puts " " puts "*slurps*" puts " " puts "+10 Stamina, +10 Charisma, +10 Vitality " puts " " end
run()
click to toggle source
Greet the user, runs CLI
program
# File lib/cli.rb, line 8 def run system("clear") # Clears terminal before starting CLI program loading_message Scraper.new.scrape # Displays product list from 1st page. greeting while menu != 'exit' # Checks to see if user will exit program. Otherwise, terminal stays open to show menu. end end