Skip to content

Instantly share code, notes, and snippets.

@krokrob
Created January 14, 2016 10:32
Show Gist options
  • Select an option

  • Save krokrob/a4814289297f8341ed74 to your computer and use it in GitHub Desktop.

Select an option

Save krokrob/a4814289297f8341ed74 to your computer and use it in GitHub Desktop.
# todo
# class restaurant
class FastFood
attr_reader :name
def initialize(name, city, prep_time)
@name = name
@city = city
@prep_time = prep_time
end
def to_s
return "Welcome to #{@name}, in #{@city}"
end
end
mcdo = FastFood.new("Mcdo", "Paris", 5)
puts mcdo.name
puts mcdo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment