CWE::DemonstrativeExample
Inherits JSON::Serializable < Struct < Value < Object
A code/intro example shipped with a CWE entry. Captures the prose
(intro_text, body_text) and one or more code snippets, each tagged
with the language and the nature of the snippet (Bad, Good,
Attack, Result, Informative).
Constructors
new(pull : JSON::PullParser)
Sourcenew(intro_text : Nil | String = nil, body_text : Array(String) = [] of String, example_code : Array(CWE::ExampleCode) = [] of ExampleCode, reference_ids : Array(String) = [] of String)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
body_text
Sourceexample_code
Sourceintro_text
Sourcereference_ids
Source