Last active
November 17, 2015 09:53
-
-
Save eofster/d25ccbfae5e90148bb33 to your computer and use it in GitHub Desktop.
Client-service relationship with dependency injection
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 Service {} | |
| class RealService: Service {} | |
| class Client { | |
| let service: Service | |
| init(service: Service) { | |
| self.service = service | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment