Last active
May 23, 2019 20:29
-
-
Save Kalvin126/814dd2551a2c43d6ed40a3dc0b0630b0 to your computer and use it in GitHub Desktop.
This file contains 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 Features { } | |
protocol Account { | |
var features: Features { get set } | |
} | |
class ProFeatures: Features { | |
} | |
class ProAccount { | |
var proFeatures: ProFeatures | |
init(features: ProFeatures) { | |
self.proFeatures = features | |
} | |
} | |
// MARK: - Account | |
extension ProAccount: Account { | |
var features: Features { return proFeatures } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment