Item removal
This commit is contained in:
@@ -16,6 +16,14 @@ class Checkout
|
||||
@items.push item
|
||||
end
|
||||
|
||||
def remove(item)
|
||||
if index = @items.index(item)
|
||||
@items.delete_at(index)
|
||||
end
|
||||
|
||||
@items
|
||||
end
|
||||
|
||||
def items
|
||||
@items
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user