class YumConnector

Handles connection using Requests and provides the results to client

Public Class Methods

food_by_id(food_id) click to toggle source

Provides the food from Yummly by its id

@param food_id [String] the id of the food on Yummly @return [Food] the food recipe from Yummly

# File lib/yum_connector.rb, line 21
def self.food_by_id(food_id)
  return food_id if food_id.eql? 'Empty plate'
  food_json = JSON.parse Request.get_recipe food_id
  Food.new food_json
end