-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshopping_methods.rb
78 lines (41 loc) · 1.25 KB
/
shopping_methods.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# # Morning Routine
# # method without variables
# def ass_hat (material)
# materials = ['nylon' 'cotton' 'wool']
# if materials.inclue?(material.downcase)
# "Built ass hat with #{material}"
# else
# "Sorry can't do that"
# end
# end
# puts ass_hat ("leather")
# def ass_hat (level, warm, material)
# "You're an ass hat of level #{level}!! You R rating is #{ass_hat_warm_rating (warm)} and material is #{material}."
# end
# def ass_hat_warm_rating(warm_rating)
# warm_rating * 2
# end
# ass_hat_level = 5
# puts ass_hat(ass_hat_level, 25) #same as puts ass_hat(5)
# puts ass_hat(ass_hat_level, 45, "nylon")
# puts ass_hat(ass_hat_level, 12)
# puts ass_hat(ass_hat_level, 8)
def sunday
"Time to go food shopping!"
end
def shopping_list(list, time, money)
"Today you have to purchase #{list} at #{places_to_shop}. You have #{time} minutes and #{money} dollars."
end
def places_to_shop
"whole_foods, king_supers, or safeway"
end
# puts shopping_list('milk eggs', "60", "50")
list = "milk and eggs"
time = "60"
money = "50"
puts shopping_list(list, time, money)
# puts places_to_shop('whole_foods', 'king_supers', 'safeway')
store1 = "whole_foods"
store2 = "king_supers"
store3 = "safeway"
# puts places_to_shop(store1, store2, store3)