Created
November 2, 2019 10:02
-
-
Save IsaAliev/040c62fd66bd68a57a89e82176b2f8c7 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
import Foundation | |
import ReactiveKit | |
protocol Command: class, BindableProtocol { | |
func execute() | |
} | |
extension Command { | |
func bind(signal: Signal<Void, Never>) -> Disposable { | |
return signal.observeNext { [weak self] _ in | |
self?.execute() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment