Skip to content

Instantly share code, notes, and snippets.

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 SahilMutualMobile/b3e1c5e35d073094e55052c867bf44cf to your computer and use it in GitHub Desktop.
Save SahilMutualMobile/b3e1c5e35d073094e55052c867bf44cf to your computer and use it in GitHub Desktop.
NewGenerics5
enum DrinkType: String, RestaurantItem {
case soda = "Soda"
case lemonade = "Lemonade"
func acceptOrderItem() -> String {
"\(self.rawValue) drink in preparation"
}
func prepareOrderItem() -> String {
"\(self.rawValue) drink is ready!"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment