private let apiClient: ApiClientType private let bag = DisposeBag() let updatedUser: Observable<UserEntity> private let _updatedUser = PublishSubject<UserEntity>() init(apiClient: ApiClientType = UserApiClientMock()) { self.apiClient = apiClient self.updatedUser = _updatedUser } func updateUser(user: UserEntity) -> Observable<Error> { return apiClient.updateUser(user) .do(onNext: { [weak self] in self?._updatedUser.onNext($0) }) .flatMap { _ in Observable<Error>.empty() } .catchError { .just($0) } } } 7JFX.PEFM͜ΕΛࢹ