-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain_menu.rb
More file actions
60 lines (43 loc) · 1.52 KB
/
Copy pathmain_menu.rb
File metadata and controls
60 lines (43 loc) · 1.52 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
module 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'
require_relative 'weather_recipe_suggestions'
require 'terminal-table'
require 'tty-table'
require 'weather-api'
def self.main_menu_sequence
rows = []
rows << ["""
. -.- . _
`. .' | `
|___| | |
:o o: |__|
_`~^~'_ ||
/'|| ^ || `(3
.' [_____] ~
`(<=| |= /2
|| ||
||_____||
~~~~~~~ ===== ~~~~~~~~
""",]
main_menu_table = Terminal::Table.new :rows => rows
main_menu_table.style = {:width => 50, :border_x => "=", :border_i => "x", :alignment => :center, }
puts main_menu_table
rows = []
rows << ["Welcome to Fancy Hank's"]
rows << ["+"* 26]
rows << ["1. View all recipes"]
rows << ["2. Filter recipes"]
rows << ["3. Get a randomn recipe"]
rows << ["4. Have Hank pick a meal for you"]
rows << ["5. Suggest a meal based on the weather?"]
main_menu_options = Terminal::Table.new :rows => rows
main_menu_options.style = {:width => 50, :border_x => "=", :border_i => "x", :alignment => :center, }
puts main_menu_options
end
end