Created
January 31, 2014 02:38
-
-
Save travisvalentine/8725727 to your computer and use it in GitHub Desktop.
PersonalChef and Butler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PersonalChef | |
def make_toast | |
puts "Making your toast!" | |
end | |
def make_milkshake | |
puts "Making your milkshake!" | |
end | |
# def make_toast(color) | |
# puts "Making your toast #{color}" | |
# end | |
# def make_milkshake(flavor) | |
# puts "Making your #{flavor} milkshake" | |
# end | |
def open_door(type) | |
puts "Welcome to the #{type} door" | |
end | |
end | |
frank = PersonalChef.new | |
frank.make_toast | |
frank.make_milkshake | |
# frank.make_toast("dark") | |
# frank.make_milkshake("chocolate") | |
frank.open_door("front") | |
class Butler | |
def open_front_door | |
puts "Welcome to the front door" | |
end | |
end | |
jeeves = Butler.new | |
jeeves.open_front_door |
Author
travisvalentine
commented
Jan 31, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment