Created
May 28, 2020 10:36
-
-
Save juliuscanute/3405e5d220905905f96189cec59fc016 to your computer and use it in GitHub Desktop.
Configuration Getter
This file contains hidden or 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
/*..*/ | |
override fun getConfigInt(userKey: String): Int { | |
val key = environment + PREFIX + userKey | |
val storeValue: StoreValue? = store[key] | |
checkNotNull(storeValue, { "Unable to find the key" }) | |
check(storeValue is StoreValue.IntValue) { "Store value must be Int" } | |
return storeValue.value | |
} | |
/*..*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment