Skip to content

Instantly share code, notes, and snippets.

@josedlpozo
Created May 30, 2017 05:33
Show Gist options
  • Save josedlpozo/66b5ba8456ae6b97006e677298ae3ad7 to your computer and use it in GitHub Desktop.
Save josedlpozo/66b5ba8456ae6b97006e677298ae3ad7 to your computer and use it in GitHub Desktop.
import Foundation
private protocol ProfessorsModuleAssembler {
func resolve() -> ProfessorsViewController
func resolve() -> ProfessorsInteractorInput
func resolve() -> ProfessorsPresenter
func resolve() -> ProfessorsRouterProtocol
}
protocol ProfessorsModule {
func resolve() -> ProfessorsViewController
}
class ProfessorsModuleAssemblerDelegate : ProfessorsModuleAssembler, ProfessorsModule {
let commons : CommonAssembler
init(commons: CommonAssembler) {
self.commons = commons
}
lazy var source : ProfessorsViewController = ProfessorsViewController(presenter: self.resolve(), router: self.resolve())
func resolve() -> ProfessorsViewController {
return source
}
func resolve() -> ProfessorsInteractorInput {
return ProfessorsInteractor(repository: commons.resolve())
}
func resolve() -> ProfessorsPresenter {
return ProfessorsPresenter(interactor: resolve())
}
func resolve() -> ProfessorsRouterProtocol {
return ProfessorsRouter()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment