Last active
March 24, 2019 17:44
-
-
Save baldraider/7aeddd4be4b343a0858049483f6e9bf0 to your computer and use it in GitHub Desktop.
Standard Subject Example
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
class RxSubjectExample { | |
fun main(args : Array<String>){ | |
val subject = Subject<String>() | |
val myObserver = MyObserver() | |
subject.subscribe(myObserver) | |
subject.onNext("a") | |
subject.onNext("b") | |
subject.onNext("c") | |
subject.onComplete() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment