-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.rb
36 lines (29 loc) · 675 Bytes
/
main.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
require_relative 'app'
require_relative 'modules/select'
class Main
def options
puts 'Please choose an option by entering a member: '
puts '1. ~ List all books.'
puts '2. ~ List all people.'
puts '3. ~ Create a people.'
puts '4. ~ Create a book.'
puts '5. ~ Create a rental.'
puts '6. ~ List all rentals for a given person id.'
puts '7. ~ Exit'
end
def execute_app
select = Select.new
puts 'Welcome to School Liabrary App!'
loop do
options
option = gets.chomp
break if option == '7'
select.select(option)
end
end
end
def main
execute_main = Main.new
execute_main.execute_app
end
main