Skip to content

Instantly share code, notes, and snippets.

@Sihui
Last active January 7, 2018 21:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sihui/6cc4dfb38ad320b081369d08cab7eba5 to your computer and use it in GitHub Desktop.
Save Sihui/6cc4dfb38ad320b081369d08cab7eba5 to your computer and use it in GitHub Desktop.
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