Created
June 26, 2021 08:08
-
-
Save orcchg/87bb918da01fef25568b5ec26124702c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class DefaultStockListInteractor @Inject constructor( | |
| private val getStocksUseCase: GetStocksUseCase, | |
| private val getStockByTickerUseCase: GetStockByTickerUseCase | |
| ) : StockListInteractor { | |
| override fun stocks(): Single<List<Stock>> = getStocksUseCase.source() | |
| override fun stock(ticker: String): Maybe<Stock> = | |
| getStockByTickerUseCase.source { | |
| GetStockByTickerUseCase.PARAM_TICKER of ticker | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment