Class: Basket
- Inherits:
-
Object
- Object
- Basket
- Defined in:
- lib/unit4/checkout/basket.rb
Overview
basket should probably be separated from the checkout, hence this class
Instance Attribute Summary collapse
-
#items ⇒ Object
Returns the value of attribute items.
Instance Method Summary collapse
-
#initialize ⇒ Basket
constructor
A new instance of Basket.
Constructor Details
#initialize ⇒ Basket
Returns a new instance of Basket.
7 8 9 |
# File 'lib/unit4/checkout/basket.rb', line 7 def initialize @items = {} end |
Instance Attribute Details
#items ⇒ Object
Returns the value of attribute items.
5 6 7 |
# File 'lib/unit4/checkout/basket.rb', line 5 def items @items end |