forked from jnappy/admin_exercise
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.rb
More file actions
21 lines (20 loc) · 684 Bytes
/
admin.rb
File metadata and controls
21 lines (20 loc) · 684 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
def user_permission
puts "Do you pay your bills? Please state yes or no"
bill_pay = gets.strip
puts "Have you cancelled a deal? Please state yes or no"
canceled_deal = gets.strip
puts "Are you an admin? Please state yes or no"
admin = gets.strip
puts "Are you signed in? Please state yes or no"
signed_in = gets.strip
if bill_pay == "no" or canceled_deal == "yes"
puts "Go away!"
elsif signed_in == "yes" and admin == "yes"
puts "You can see and change all the pages!"
elsif signed_in == "yes" and admin == "no"
puts "You can see all the pages."
elsif signed_in == "no"
puts "You can't see any of the pages, please sign in."
end
end
user_permission