EnumClass
EnumClass
EnumClass is the base class used to create hierarchical enums. The only example in Spitsh of this is the OS EnumClass which stores the relationships between Operating Systems.
ACCEPTS
Returns True if the argument EnumClass is a member of the invocant EnumClass.
has-member
Returns true if the argument string exactly matches a member of the enum class.
say Debian.has-member('Ubuntu'); # true
say RHEL.has-member('Ubuntu'); # false
say Ubuntu ~~ Debian; # true
Parameter | Description |
$candidate | A string to match against the enum's members |
name
method name( ā¶ Str)
Returns the name of the enum class.