fitzoh
12/01/2017, 3:25 PM@Suppress("unused") // groovy magic method - don't change name/signature
fun methodMissing(name: String, args: Any?): Any? {
if (name.endsWith("Bundle") && args is Array<*>) {
val bundlerId = name.removeSuffix("Bundle")
val arg = args.singleOrNull()
when (arg) {
is Closure<*> -> return bundle(bundlerId, arg)
is Function1<*, *> -> @Suppress("UNCHECKED_CAST") return bundle<BundleConfig>(bundlerId, arg as Function1<BundleConfig, Unit>)
}
}
...omitted...