Skip to content

Instantly share code, notes, and snippets.

@ericntd
Created January 6, 2022 20:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericntd/162e7dfc499b965c870dadb43bb4084b to your computer and use it in GitHub Desktop.
Save ericntd/162e7dfc499b965c870dadb43bb4084b to your computer and use it in GitHub Desktop.
Contribute instead of Inject example
@AppScope
class CatRepository @Contribute constructor(private val api: CatApi) {
fun getCat(): Single<CatResponse> {
return api.getCat()
.subscribeOn(Schedulers.io())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment