Class: FoodFinder

Inherits:
Object
  • Object
show all
Defined in:
lib/food/food_finder.rb

Class Method Summary collapse

Class Method Details

.find(name) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/food/food_finder.rb', line 5

def self.find(name)
  matching_food = find_food(name)

  if matching_food.first == :found
    food_detail(matching_food.last)
  else
    puts matching_food.last
  end
end