Skip to content

Commit 71dc8a2

Browse files
raid5freak4pc
authored andcommitted
Fixed buffered typos.
1 parent 6a1cfd5 commit 71dc8a2

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

Playground/RxSwiftExtPlayground.playground/Pages/pausableBuffered.xcplaygroundpage/Contents.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,24 @@ Pauses the elements of the source observable sequence based on the latest elemen
1919

2020
While paused, elements from the source are buffered, limited to a maximum number of element.
2121

22-
When resumed, all bufered elements are flushed as single events in a contiguous stream.
22+
When resumed, all buffered elements are flushed as single events in a contiguous stream.
2323
*/
2424

2525
example("pausableBuffered") {
26-
26+
2727
let observable = Observable<Int>.interval(1, scheduler: MainScheduler.instance)
28-
28+
2929
let trueAtThreeSeconds = Observable<Int>.timer(3, scheduler: MainScheduler.instance).map { _ in true }
3030
let falseAtFiveSeconds = Observable<Int>.timer(5, scheduler: MainScheduler.instance).map { _ in false }
3131
let pauser = Observable.of(trueAtThreeSeconds, falseAtFiveSeconds).merge()
32-
32+
3333
// unlimited buffering of values received while paused
3434
let pausedObservable = observable.pausableBuffered(pauser, limit: nil)
35-
35+
3636
pausedObservable
3737
.subscribe { print($0) }
38-
38+
3939
playgroundShouldContinueIndefinitely()
40-
40+
4141
}
4242
//: [Next](@next)

Source/RxSwift/pausableBuffered.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ extension ObservableType {
1313

1414
/**
1515
Pauses the elements of the source observable sequence based on the latest element from the second observable sequence.
16-
16+
1717
While paused, elements from the source are buffered, limited to a maximum number of element.
18-
19-
When resumed, all bufered elements are flushed as single events in a contiguous stream.
20-
18+
19+
When resumed, all buffered elements are flushed as single events in a contiguous stream.
20+
2121
- seealso: [pausable operator on reactivex.io](http://reactivex.io/documentation/operators/backpressure.html)
22-
22+
2323
- parameter pauser: The observable sequence used to pause the source observable sequence.
2424
- parameter limit: The maximum number of element buffered. Pass `nil` to buffer all elements without limit. Default 1.
25-
- parameter flushOnCompleted: If `true` bufered elements will be flushed when the source completes. Default `true`.
26-
- parameter flushOnError: If `true` bufered elements will be flushed when the source errors. Default `true`.
25+
- parameter flushOnCompleted: If `true` buffered elements will be flushed when the source completes. Default `true`.
26+
- parameter flushOnError: If `true` buffered elements will be flushed when the source errors. Default `true`.
2727
- returns: The observable sequence which is paused and resumed based upon the pauser observable sequence.
2828
*/
2929
public func pausableBuffered<P: ObservableType> (_ pauser: P, limit: Int? = 1, flushOnCompleted: Bool = true, flushOnError: Bool = true) -> Observable<Element> where P.Element == Bool {

0 commit comments

Comments
 (0)