forked from CoreKit/viper-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path{Name}Module.swift
64 lines (41 loc) · 1.18 KB
/
{Name}Module.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//
// {Name}name.swift
// {project}
//
// Created by {author} on {date}.
//
import Foundation
import UIKit
// MARK: - router
protocol {Name}RouterPresenterInterface: RouterPresenterInterface {
}
// MARK: - presenter
protocol {Name}PresenterRouterInterface: PresenterRouterInterface {
}
protocol {Name}PresenterInteractorInterface: PresenterInteractorInterface {
}
protocol {Name}PresenterViewInterface: PresenterViewInterface {
func start()
}
// MARK: - interactor
protocol {Name}InteractorPresenterInterface: InteractorPresenterInterface {
}
// MARK: - view
protocol {Name}ViewPresenterInterface: ViewPresenterInterface {
}
// MARK: - name builder
final class {Name}name: ModuleInterface {
typealias View = {Name}View
typealias Presenter = {Name}Presenter
typealias Router = {Name}Router
typealias Interactor = {Name}Interactor
func build() -> UIViewController {
let view = View()
let interactor = Interactor()
let presenter = Presenter()
let router = Router()
self.assemble(view: view, presenter: presenter, router: router, interactor: interactor)
router.viewController = view
return view
}
}