Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
public final class SearchBuilder {
private let dependenciesSolver: SearchDependencies
public init(dependenciesSolver: SearchDependencies) {
self.dependenciesSolver = dependenciesSolver
}
public func makeViewController() -> UIViewController {
let client = dependenciesSolver.makeClient()
let analytics = dependenciesSolver.makeLogger()
return SearchViewController(client: client, logger: logger)
}
}
// From the app
let searchBuilder = SearchBuilder(dependenciesSolver: AppDependencies())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment