Last active
December 11, 2020 03:17
-
-
Save stevenchou1130/4ef76c7bd3ce817171ec2a5f1affe9be to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol Engineer: CustomStringConvertible { | |
var team: Team { get } | |
var canDevelopiOS: Bool { get } | |
} | |
extension CustomStringConvertible where Self: Engineer { | |
var description: String { | |
switch team { | |
case .android: | |
return "I belong to Android team." | |
case .iOS: | |
return "I belong to iOS team." | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment