Skip to content

class Crystal::ExhaustivenessChecker::TypeTarget
inherits Crystal::ExhaustivenessChecker::Target

Any other target is a type target. The target to cover is the type itself.

Methods

#add_subtargets(type_groups : Array(Array(Type)), index : Int32) : Nil

Add subtargets for the given type groups, starting at index.

View source

#cover(patterns : Array(Pattern), index : Int32) : Nil

Covers this target and subsequent subtargets with the patterns starting at index.

View source

#covered? : Bool

Was this target covered?

View source

#missing_cases : Array(String)

What are the cases that we didn't cover?

View source

#reject_covered! : Bool

Removes covered subtargets from this target, and returns whether this target ended up being entirely covered.

View source

#subtargets : Array(Target)

#subtargets=(subtargets : Array(Target))

View source

#subtargets? : Array(Target)?