Skip to content

Commit

Permalink
✨ Fix PublicViewController
Browse files Browse the repository at this point in the history
  • Loading branch information
usatie committed Apr 20, 2019
1 parent f1023c5 commit c93e5a9
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion PublicViewController.xctemplate/TemplateInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
<array>
<string>-Instantiatable</string>
<string>-Instantiatable Injectable</string>
<string>-Instantiatable Emittable</string>
<string>-Instantiatable Interactable</string>
<string>-Instantiatable Injectable Interactable</string>
</array>
</dict>
</array>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,22 @@
import UIKit
import AppCore

public final class ___FILEBASENAME___: UIViewController, Instantiatable, Injectable, Interactable {
public final class ___FILEBASENAME___: UIViewController, Instantiatable, Emittable {

// MARK: - Mew.Instantiatable
typealias Input = <#value#>
public typealias Input = <#value#>
public typealias Environment = EnvironmentProvider
public var environment: Environment

// MARK: - Mew.Injectable
private var input: Input {
didSet { updateUI() }
}

func input(_ input: Input) {
self.input = input
}

// MARK: - Mew.Emittable
typealias Output = <#value#>
public typealias Output = <#value#>
private var handler: ((Output) -> Void)?
func output(_ handler: ((Output) -> Void)?) {
public func output(_ handler: ((Output) -> Void)?) {
self.handler = handler
}

public init(with input: Input, environment: Environment) {
self.environment = environment
self.input = input
super.init(nibName: nil, bundle: Bundle(for: type(of: self)))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import AppCore
public final class ___FILEBASENAME___: UIViewController, Instantiatable, Injectable {

// MARK: - Mew.Instantiatable
typealias Input = <#value#>
public typealias Input = <#value#>
public typealias Environment = EnvironmentProvider
public var environment: Environment

Expand All @@ -15,7 +15,7 @@ public final class ___FILEBASENAME___: UIViewController, Instantiatable, Injecta
didSet { updateUI() }
}

func input(_ input: Input) {
public func input(_ input: Input) {
self.input = input
}

Expand Down
16 changes: 13 additions & 3 deletions PublicViewController.xctemplate/ViewController+Interactable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,29 @@ import AppCore
public final class ___FILEBASENAME___: UIViewController, Instantiatable, Interactable {

// MARK: - Mew.Instantiatable
typealias Input = <#value#>
public typealias Input = <#value#>
public typealias Environment = EnvironmentProvider
public var environment: Environment

// MARK: - Mew.Injectable
private var input: Input {
didSet { updateUI() }
}

public func input(_ input: Input) {
self.input = input
}

// MARK: - Mew.Emittable
typealias Output = <#value#>
public typealias Output = <#value#>
private var handler: ((Output) -> Void)?
func output(_ handler: ((Output) -> Void)?) {
public func output(_ handler: ((Output) -> Void)?) {
self.handler = handler
}

public init(with input: Input, environment: Environment) {
self.environment = environment
self.input = input
super.init(nibName: nil, bundle: Bundle(for: type(of: self)))
}

Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion PublicViewController.xctemplate/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import AppCore
public final class ___FILEBASENAME___: UIViewController, Instantiatable {

// MARK: - Mew.Instantiatable
typealias Input = <#value#>
public typealias Input = <#value#>
public typealias Environment = EnvironmentProvider
public var environment: Environment

Expand Down

0 comments on commit c93e5a9

Please sign in to comment.