Skip to content

Instantly share code, notes, and snippets.

@5AbhishekSaxena
Last active July 15, 2022 20:54
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 5AbhishekSaxena/3a0e3670435999d111784ec0b96743e9 to your computer and use it in GitHub Desktop.
Save 5AbhishekSaxena/3a0e3670435999d111784ec0b96743e9 to your computer and use it in GitHub Desktop.
interface UserDataSource {
fun save(user: User)
}
class RemoteUserDataSource : UserDataSource {
override fun save(user: User) {
println("Calling save in remote data source.")
}
}
class FakeUserDataSource : UserDataSource {
override fun save(user: User) {
println("Calling save in fake data source.")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment