Skip to content

Instantly share code, notes, and snippets.

@ronstar
Last active December 8, 2020 06:40
Show Gist options
  • Save ronstar/94117ed07f39212d6c3c2176b75d20dd to your computer and use it in GitHub Desktop.
Save ronstar/94117ed07f39212d6c3c2176b75d20dd to your computer and use it in GitHub Desktop.
Service three configurable
class ServiceThreeConfigurable: ServiceThreeProtocol, Configurable { // 1
struct ServiceThreeConfiguration { // 2
var paramOne: Bool
var paramTwo: Data
}
let serviceOne: ServiceOneProtocol
var paramOne: Bool! // 3
var paramTwo: Data!
init(serviceOne: ServiceOneProtocol) {
self.serviceOne = serviceOne
}
func configure(configuration: ServiceThreeConfiguration) { // 4
self.paramOne = configuration.paramOne
self.paramTwo = configuration.paramTwo
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment