Skip to content

Instantly share code, notes, and snippets.

@eofster
Last active November 17, 2015 09:54
Show Gist options
  • Save eofster/348f4c4c4664584c90ff to your computer and use it in GitHub Desktop.
Save eofster/348f4c4c4664584c90ff to your computer and use it in GitHub Desktop.
Client-service relationship without dependency injection
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