app ``` interface WeatherRepository { fun fetchWe...
# spek
r
app
Copy code
interface WeatherRepository {
	fun fetchWeather() : Single<List<Weather>>	
}

class WeatherDataStore (private val service: WeatherService) : WeatherRepository {
	override fun fetchWeather() : Single<List<Weather>> {
		return service.fetchWeather()
					  .compose(singleIo())
	}
}


class WeatherPresenter (private val repository : WeatherRepository) {
	fun fetchWeather() {
		repository.fetchWeather().subscribe({ success -> 
			// todo
		}, { error ->
			// todo
		})
	}
}