Last active
June 3, 2017 17:07
-
-
Save sergdort/411f208b3dc191155b984ab3a49af724 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
public final class Observer<E>: ObserverType { | |
private let _handler: (Event<E>) -> Void | |
public init(handler: @escaping (Event<E>) -> Void) { | |
_handler = handler | |
} | |
public func on(event: Event<E>) { | |
_handler(event) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment