Created
September 29, 2018 03:42
-
-
Save rachidcalazans/215a6d3d405334804de7c744019b4f5c to your computer and use it in GitHub Desktop.
Design Patterns in Ruby - Template Method
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 Cappuccino < CaffeineBeverage | |
def brew_condiments | |
puts 'brew cappuccino grinds' | |
end | |
def add_aditional_condiments | |
puts 'add sugar' | |
end | |
end | |
class Tea < CaffeineBeverage | |
def brew_condiments | |
puts 'steep the bag' | |
end | |
def add_aditional_condiments | |
puts 'add lemon' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment