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 = {}
|
||||
meals.each do |meal|
|
||||
unless total.key?(meal[:food])
|
||||
total[(meal[:food])] = 0
|
||||
total[meal[:food]] = 0
|
||||
end
|
||||
total[(meal[:food])] += meal[:quantity]
|
||||
total[meal[:food]] += meal[:quantity]
|
||||
end
|
||||
total
|
||||
end
|
||||
Reference in new issue
Block a user