Skip to content

Instantly share code, notes, and snippets.

@baldraider
Last active March 24, 2019 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baldraider/7aeddd4be4b343a0858049483f6e9bf0 to your computer and use it in GitHub Desktop.
Save baldraider/7aeddd4be4b343a0858049483f6e9bf0 to your computer and use it in GitHub Desktop.
Standard Subject Example
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