Skip to content

Instantly share code, notes, and snippets.

@prostakm
Created November 16, 2017 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prostakm/b104a41d34df397dab4fc7f05b62a368 to your computer and use it in GitHub Desktop.
Save prostakm/b104a41d34df397dab4fc7f05b62a368 to your computer and use it in GitHub Desktop.
protocol UseCase {
func execute() -> String
}
class ShowDataUseCase: UseCase {
let gateway: DataGateway
init(dataGateway: DataGateway) {
self.gateway = dataGateway
}
func execute() -> String {
return gateway.getData()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment