RegexItemTransformationRule

data class RegexItemTransformationRule(from: Regex, transform: MutableMeta.(name: Name, MatchResult, Meta?) -> Unit) : TransformationRule

Functions

matches
Link copied to clipboard
common
open override fun matches(name: Name, item: Meta?): Boolean

Check if this transformation should be applied to a node with given name and value

selectItems
Link copied to clipboard
common
open fun selectItems(meta: Meta): Sequence<Name>

Select all items to be transformed. Item could be a value as well as node

transformItem
Link copied to clipboard
common
open override fun transformItem(name: Name, item: Meta?, target: MutableMeta)

Apply transformation for a single item (Node or Value) to the target

Properties

from
Link copied to clipboard
common
val from: Regex
transform
Link copied to clipboard
common
val transform: MutableMeta.(name: Name, MatchResult, Meta?) -> Unit