-
Notifications
You must be signed in to change notification settings - Fork 0
/
display_recipes_end_menu.rb
46 lines (36 loc) · 1.14 KB
/
display_recipes_end_menu.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
module DisplayRecipesEndMenu
require_relative "main_menu"
require_relative 'recipe_hash'
require_relative 'main_menu'
require_relative 'display_recipes'
require_relative 'filter_recipes'
require_relative 'display_recipes_end_menu'
require_relative 'search_ingredient'
require_relative 'randomize_recipe'
def self.end_sequence
puts "What would you like to do?"
puts "1. Return to main menu"
puts "2. Exit"
end_menu_choice = gets.chomp
if end_menu_choice == "1"
puts Main_Menu::main_menu_sequence
main_menu_choice = gets.chomp.to_s
if main_menu_choice == '1'
Display_Recipe::display_recipes
elsif main_menu_choice == '2'
Filter_Recipe::filter_recipe_sequence
elsif main_menu_choice == '3'
RandomizeRecipe::choose_random_recipe
elsif main_menu_choice == '4'
DisplayRecipesEndMenu::end_sequence
elsif main_menu_choice == '5'
DisplayRecipesEndMenu::end_sequence
else
"Try again"
end
else
puts "Enjoy your meal!"
exit
end
end
end