lib/order.rb
# define method to add a product to the collection of @products for this order
define method to add a product to the collection of @products for this order
define method to add a product to the collection of @products for this order
def add_product(product_name, price)
    raise ArgumentError.new, "That product has already been added" if @products.key?(product_name)
    @products[product_name] = price
  end
def add_product ( product_name , price ) raise ArgumentError . new , "That product has already been added" if @products . key? ( product_name ) @products [ product_name ] = price end
define method to add a product to the collection of @products for this order
define method to add a product to the collection of @products for this order
product_name
<not_specific>
price
<not_specific>