Skip to content

Instantly share code, notes, and snippets.

@xpqz
Created October 14, 2014 08:59
Show Gist options
  • Save xpqz/8d7cb3761d39bfbce8fd to your computer and use it in GitHub Desktop.
Save xpqz/8d7cb3761d39bfbce8fd to your computer and use it in GitHub Desktop.
enum Grade: Printable {
case UKTrad(adjectival: Adjectival, technical: String?)
var description: String {
switch self {
case let UKTrad(adjectival, technical):
if technical == nil {
return adjectival.description
}
return "\(adjectival.description) \(technical!)"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment