Created
July 19, 2019 15:47
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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