io.cloudshiftdev.awscdk.common.MapBuilder.kt Maven / Gradle / Ivy
The newest version!
package io.cloudshiftdev.awscdk.common
@CdkDslMarker
public class MapBuilder {
public val map: MutableMap = mutableMapOf()
public infix fun String.to(other: String) {
map[this] = other
}
public infix fun String.to(other: Collection) {
map[this] = other
}
public inline operator fun String.invoke(block: MapBuilder.() -> Unit) {
val builder = MapBuilder()
builder.apply(block)
map[this] = builder.map
}
}