Skip to content

Instantly share code, notes, and snippets.

@AdamMc331
Created July 19, 2019 15:47
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 AdamMc331/ff4e23b615c3186ca56398af5938fa15 to your computer and use it in GitHub Desktop.
Save AdamMc331/ff4e23b615c3186ca56398af5938fa15 to your computer and use it in GitHub Desktop.
Quick example that shows how to use Kotlin default params to help with DI.
class HumanTimeHelper(private val clock: IClock = SystemClock()) {
// This allows me to update my helper class, _without_ changing the call site!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment