Item removal

This commit is contained in:
David Underwood
2026-07-15 11:50:49 -04:00
parent 07a9c25d9e
commit e7f6a9620f
3 changed files with 55 additions and 1 deletions
+8
View File
@@ -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