exercise done
This commit is contained in:
1 parent
55030af64d
commit
7049ba14b4
1 file changed
+2
-2
@@ -39,9 +39,9 @@ def meal_totals(meals)
|
|||||||
total = {}
|
total = {}
|
||||||
meals.each do |meal|
|
meals.each do |meal|
|
||||||
unless total.key?(meal[:food])
|
unless total.key?(meal[:food])
|
||||||
total[(meal[:food])] = 0
|
total[meal[:food]] = 0
|
||||||
end
|
end
|
||||||
total[(meal[:food])] += meal[:quantity]
|
total[meal[:food]] += meal[:quantity]
|
||||||
end
|
end
|
||||||
total
|
total
|
||||||
end
|
end
|
||||||
Reference in new issue
Block a user