Class: Basket

Inherits:
Object
  • Object
show all
Defined in:
lib/unit4/checkout/basket.rb

Overview

basket should probably be separated from the checkout, hence this class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBasket

Returns a new instance of Basket.



7
8
9
# File 'lib/unit4/checkout/basket.rb', line 7

def initialize
  @items = {}
end

Instance Attribute Details

#itemsObject

Returns the value of attribute items.



5
6
7
# File 'lib/unit4/checkout/basket.rb', line 5

def items
  @items
end