What does this method form the 2. agile book do?

Hi Kristen, the second line searches for a product within the within
the collection of current products. That is

@items.find { |item| item.product == product }

or you can write it as follows

for each item in @items

   if item.product == product
     current_item = item
     break
   end

end

Lastly, it seems that you missing an 'end' of the last line of the method.

Good luck,

-Conrad

Hi, the for loop should read...

for item in @items # no each within a ruby for loop

  if item.product == product
    current_item = item
    break
  end

end

-Conrad