Skip to content

Instantly share code, notes, and snippets.

@ReneeVandervelde
Created September 18, 2022 21:50
Show Gist options
  • Save ReneeVandervelde/b142fec9f3674609d52c053dc7c30811 to your computer and use it in GitHub Desktop.
Save ReneeVandervelde/b142fec9f3674609d52c053dc7c30811 to your computer and use it in GitHub Desktop.
value class LightType private constructor(
private val type: string,
) {
companion object {
val LightBulb = LightType("light_bulb")
val LightStrip = LightType("light_strip")
val FloodLight = LightType("flood_light")
fun values() = arrayOf(LightBulb, LightStrip, FloodLight)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment