class Crystal::ExhaustivenessChecker::EnumTarget
inherits Crystal::ExhaustivenessChecker::Target
¶
An enum target. Subtargets are the enum members.
Class methods¶
Methods¶
#add_subtargets(type_groups : Array(Array(Type)), index : Int32) : Nil
¶
(type_groups : Array(Array(Type)), index : Int32) : Nil
Add subtargets for the given type groups, starting at index.
#cover(patterns : Array(Pattern), index : Int32) : Nil
¶
(patterns : Array(Pattern), index : Int32) : Nil
Covers this target and subsequent subtargets with the patterns starting at index.
#cover(pattern : Pattern) : Nil
¶
(pattern : Pattern) : Nil
Tries to cover this target with the given pattern. By default, a TypePattern will cover a target. Other, more specific, patterns will partially cover a target.
#reject_covered! : Bool
¶
: Bool
Removes covered subtargets from this target, and returns whether this target ended up being entirely covered.