Skip to content

Instantly share code, notes, and snippets.

@VAnsimov
Created October 13, 2021 15:41
Show Gist options
  • Save VAnsimov/0d6d72233cc8ffccb55d86721fc1b32e to your computer and use it in GitHub Desktop.
Save VAnsimov/0d6d72233cc8ffccb55d86721fc1b32e to your computer and use it in GitHub Desktop.
final class ListIntent {
// 1
private weak var model: ListModelActionsProtocol?
init(model: ListModelActionsProtocol) {
self.model = model
}
func viewOnAppear() {
let number = Int.random(in: 0 ..< 100)
// 2
model?.parse(number: number)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment