ancestor

inline fun <T : RuleContext> RuleContext.ancestor(): T
fun <T : RuleContext> RuleContext.ancestor(kclass: KClass<T>): T

Find the ancestor of the given element with the given class.