class
CycloneDX::BOM
- CycloneDX::BOM
- Reference
- Object
Overview
Represents a CycloneDX Bill of Materials (BOM). This class manages a collection of components and provides methods for serializing the BOM into different formats (JSON, XML, CSV).
Included Modules
- JSON::Serializable
Defined in:
cyclonedx/bom.crConstant Summary
-
BOM_FORMAT =
"CycloneDX" -
BOM_VERSION =
1 -
XML_NAMESPACE =
"http://cyclonedx.org/schema/bom"
Constructors
-
.new(components : Array(Component), spec_version : String, metadata : Metadata | Nil = nil, dependencies : Array(Dependency) | Nil = nil)
Initializes a new CycloneDX BOM.
- .new(pull : JSON::PullParser)
Instance Method Summary
-
#bom_format : String
Specifies the format of the BOM (always "CycloneDX" for JSON serialization).
-
#bom_version : Int32
The version of the BOM itself (not the spec version), typically 1.
-
#components : Array(Component)
An array of
CycloneDX::Componentobjects included in the BOM. -
#dependencies : Array(Dependency) | Nil
An array of
CycloneDX::Dependencyobjects describing component relationships. -
#metadata : Metadata | Nil
Metadata about the BOM.
-
#serial_number : String
The unique serial number of the BOM.
-
#spec_version : String
The CycloneDX specification version.
-
#to_csv : String
Serializes the BOM to CSV format.
-
#to_xml : String
Serializes the BOM to XML format.
Constructor Detail
Initializes a new CycloneDX BOM.
Instance Method Detail
Specifies the format of the BOM (always "CycloneDX" for JSON serialization).
An array of CycloneDX::Component objects included in the BOM.
An array of CycloneDX::Dependency objects describing component relationships.