class FastFoodNutrition::Restaurant
Attributes
categories[RW]
name[RW]
url[RW]
Public Class Methods
all()
click to toggle source
# File lib/Fast_Food_Nutrition/restaurant.rb, line 10 def self.all @@all end
find_restaurant_by_name(name)
click to toggle source
# File lib/Fast_Food_Nutrition/restaurant.rb, line 14 def self.find_restaurant_by_name(name) restaurant = "" self.all.each do |location| if name == location.name restaurant = location end end restaurant end
new(name, url)
click to toggle source
# File lib/Fast_Food_Nutrition/restaurant.rb, line 4 def initialize(name, url) @name = name @url = url @@all << self end