Skip to content

Instantly share code, notes, and snippets.

@petrosDemetrakopoulos
Created January 11, 2021 19:00
Show Gist options
  • Save petrosDemetrakopoulos/25e1c3018df1fcba1d06c2a42ac41189 to your computer and use it in GitHub Desktop.
Save petrosDemetrakopoulos/25e1c3018df1fcba1d06c2a42ac41189 to your computer and use it in GitHub Desktop.
Pizza Enum
enum Pizza {
case preparePizza(id: Int, size: Int?, type: PizzaType, doughType: DoughType)
case addedExtras(id: Int, extras: [String:Int])
case bakedPizza(id: Int)
case deliveredPizza(id: Int)
init(id: Int, size: Int?, type: PizzaType, doughType: DoughType) {
self = .preparePizza(id: id, size: size, type: type, doughType: doughType)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment