Class: Till
- Inherits:
-
Object
- Object
- Till
- Defined in:
- lib/till.rb
Instance Method Summary collapse
Instance Method Details
#total_for(basket) ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/till.rb', line 2 def total_for basket total=0 basket.items.each do |item| total = total + item_price(item) end total end |