1
0
This commit is contained in:
2021-12-01 22:27:53 +01:00
parent 3e09eee5b7
commit 15b11a191d
3 changed files with 88 additions and 1 deletions
@@ -15,7 +15,7 @@ fun BeanContext.findDayDefinition(day: Int): BeanDefinition<*>? = allBeanDefinit
inline fun <reified T> createDay() = createDay(T::class.java)
// A custom resourceLoader that returns a string should be more appropriate but ¯\_(ツ)_/¯
private fun BeanContext.registerExampleLoader(example: String) {
fun BeanContext.registerExampleLoader(example: String) {
registerSingleton(TempFileResourceLoader(File.createTempFile("aoc-example", ".txt").apply {
writeText(example)
}))