struct

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(intro_text : Nil | String = nil, body_text : Array(String) = [] of String, example_code : Array(CWE::ExampleCode) = [] of ExampleCode, reference_ids : Array(String) = [] of String)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

body_text
Source
example_code
Source
intro_text
Source
reference_ids
Source