Skip to content

Instantly share code, notes, and snippets.

@JiLiZART
Created May 18, 2017 07:45
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 JiLiZART/48d4dc87a0f924d2bb421772e53031cf to your computer and use it in GitHub Desktop.
Save JiLiZART/48d4dc87a0f924d2bb421772e53031cf to your computer and use it in GitHub Desktop.
enum Event {
enum app: String {
case install = "app install"
case launch = "app launch"
}
enum list: String {
case created = "list created"
case deleted = "list deleted"
case refreshed = "list refreshed"
}
}
func printEvent<T : RawRepresentable>(_ event: T) {
print(event.rawValue);
}
let myEvent = Event.app.launch
printEvent(myEvent)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment