Merge pull request #714 from bshewmak/develop

Fix Demo: Filtering and Conditional Operators
This commit is contained in:
Krunoslav Zaher 2016-06-08 13:32:44 +02:00
commit b37f3f5bb6
1 changed files with 10 additions and 0 deletions

View File

@ -73,6 +73,16 @@ example("single") {
example("single with conditions") {
let disposeBag = DisposeBag()
Observable.of("🐱", "🐰", "🐶", "🐸", "🐷", "🐵")
.single { $0 == "🐸" }
.subscribe { print($0) }
.addDisposableTo(disposeBag)
Observable.of("🐱", "🐰", "🐶", "🐱", "🐰", "🐶")
.single { $0 == "🐰" }
.subscribe { print($0) }
.addDisposableTo(disposeBag)
Observable.of("🐱", "🐰", "🐶", "🐸", "🐷", "🐵")
.single { $0 == "🔵" }
.subscribe { print($0) }