Skip to content

Instantly share code, notes, and snippets.

@mcatta
Created March 22, 2020 16:09
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 mcatta/2cf6a7edfd5db84bd0b7e6f57e40818c to your computer and use it in GitHub Desktop.
Save mcatta/2cf6a7edfd5db84bd0b7e6f57e40818c to your computer and use it in GitHub Desktop.
Return an RX Java object
class DataRepository {
fun fetchDataWithRX(): Single<List<DataModel>> {
return Single.just(listOf(
DataModel(1, "Value 1"), DataModel(2, "Value 2"),
DataModel(3, "Value 3"), DataModel(4, "Value 4")
))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment