Last active
April 23, 2017 16:34
-
-
Save Sihui/2969943b39c2bcfb803d24eb89bf0b63 to your computer and use it in GitHub Desktop.
For [Design Patterns in Life and Ruby](https://medium.com/series/design-patterns-in-life-and-ruby-fcde31ba51a0/edit)
This file contains 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 GrilledChicken | |
def cook | |
stuffing = [] | |
stuffing << 'sliced tomato' | |
stuffing << 'lettuce' | |
stuffing << 'grilled chicken' | |
stuffing | |
end | |
end | |
class BeefPatty | |
def cook | |
stuffing = [] | |
stuffing << 'cheese' | |
stuffing << 'grilled beef patty' | |
stuffing | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment