Created
January 29, 2017 19:38
-
-
Save ethanjdiamond/3de6a176352c817ab3471ffbd590152b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol Buildable: class { | |
associatedtype R: Routable | |
associatedtype I: Interactable | |
associatedtype P: Presentable | |
func build(store: AppStore) -> R! | |
func configure(store: AppStore, router: R, interactor: I, presenter: P?) | |
} | |
class Builder<R: Routable, I: Interactable, P: Presentable> { | |
func build(store: AppStore) -> R! { | |
return nil | |
} | |
func configure(store: AppStore, router: R, interactor: I, presenter: P?) { | |
router.configure(interactor: interactor, viewController: presenter?.viewController) | |
interactor.configure(store: store, router: router) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment