aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firm/User.kt
blob: 09b0b73f45d7260eed26517c6e91f15c271a1919 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package moe.nea.firm

import ext.StringIdentifiable
import kotlin.enums.enumEntries

object User : ManagedConfig("test") {
	val option by choice("name") { TestEnum.A }
	val optionAlt by choice("name", enumEntries<TestEnum>(),
	                        StringIdentifiable.createCodec { enumValues<TestEnum>() },
	                        EnumRenderer.default<TestEnum>()) { TestEnum.A }

	enum class TestEnum : StringIdentifiable {
		A, B, C;
	}
}
fun main() {
	User.option
}