Last active
November 17, 2015 09:54
-
-
Save eofster/348f4c4c4664584c90ff to your computer and use it in GitHub Desktop.
Client-service relationship without 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 = RealService() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment