Skip to content

Commit

Permalink
Change argument name for observe* method.
Browse files Browse the repository at this point in the history
  • Loading branch information
srdanrasic committed Aug 29, 2016
1 parent a646415 commit b1a7365
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/SignalProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public protocol SignalProtocol {
extension SignalProtocol {

/// Register an observer that will receive elements from `.next` events of the signal.
public func observeNext(observer: @escaping (Element) -> Void) -> Disposable {
public func observeNext(with observer: @escaping (Element) -> Void) -> Disposable {
return observe { event in
if case .next(let element) = event {
observer(element)
Expand All @@ -51,7 +51,7 @@ extension SignalProtocol {
}

/// Register an observer that will receive elements from `.failed` events of the signal.
public func observeFailed(observer: @escaping (Error) -> Void) -> Disposable {
public func observeFailed(with observer: @escaping (Error) -> Void) -> Disposable {
return observe { event in
if case .failed(let error) = event {
observer(error)
Expand All @@ -60,7 +60,7 @@ extension SignalProtocol {
}

/// Register an observer that will be executed on `.completed` event.
public func observeCompleted(observer: @escaping () -> Void) -> Disposable {
public func observeCompleted(with observer: @escaping () -> Void) -> Disposable {
return observe { event in
if case .completed = event {
observer()
Expand Down

0 comments on commit b1a7365

Please sign in to comment.