CWE::Abstraction
Inherits Enum < Comparable < Value < Object
CWE catalog defines a small fixed set of abstraction levels. We expose
them as an enum so callers can pattern-match against them; unknown values
(catalog drift, future MITRE releases) map to Other.
Compound is a genuine member of MITRE's AbstractionEnumeration, not a
synonym for Structure: the seven Compound entries (CWE-61, 352, 384,
680, 689, 690, 692) carry Abstraction="Compound" and a separate
Structure of Chain or Composite.
Constants
Constructors
Instance methods
JSON uses the MITRE label ("Base"), matching to_s and the
"abstraction"/"status"/… fields the library already emits — not
Crystal's default underscored member name ("base"). Reading is as
forgiving as parse_label: an unrecognised label becomes Other
instead of raising, so a future MITRE value cannot break a decode.
Appends a String representation of this enum member to the given io.
See also: to_s.
Returns a String representation of this enum member.
In the case of regular enums, this is just the name of the member.
In the case of flag enums, it's the names joined by vertical bars, or "None",
if the value is zero.
If an enum's value doesn't match a member's value, the raw value is returned as a string.
Color::Red.to_s # => "Red"
IOMode::None.to_s # => "None"
(IOMode::Read | IOMode::Write).to_s # => "Read | Write"
Color.new(10).to_s # => "10"