Last active
January 7, 2018 21:30
-
-
Save Sihui/6cc4dfb38ad320b081369d08cab7eba5 to your computer and use it in GitHub Desktop.
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 PizzaStore | |
def take_order(pizza_type) | |
case pizza_type | |
when 'matcha' | |
pizza = Pizza.new('Matcha Pizza', ['matcha powder']) | |
when 'pepperoni' | |
pizza = Pizza.new('Pepperoni Pizza', ['pepperoni', 'shredded mozzarella cheese']) | |
when 'chicken' | |
pizza = Pizza.new('Chicken Pizza', ['chicken', 'mushroom', 'spinach']) | |
else | |
pizza = Pizza.new('Cheese Pizza', ['cheese']) | |
end | |
pizza.bake | |
pizza | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment