Class: Chelsea::Bom
- Inherits:
-
Object
- Object
- Chelsea::Bom
- Defined in:
- lib/chelsea/bom.rb
Overview
Class to convert dependencies to SBOM xml
Instance Method Summary collapse
- #collect ⇒ Object
-
#initialize(dependencies) ⇒ Bom
constructor
A new instance of Bom.
- #random_urn_uuid ⇒ Object
- #to_s ⇒ Object
- #xml ⇒ Object
Constructor Details
#initialize(dependencies) ⇒ Bom
Returns a new instance of Bom.
25 26 27 |
# File 'lib/chelsea/bom.rb', line 25 def initialize(dependencies) @dependencies = dependencies end |
Instance Method Details
#collect ⇒ Object
29 30 31 32 |
# File 'lib/chelsea/bom.rb', line 29 def collect xml to_s end |
#random_urn_uuid ⇒ Object
42 43 44 |
# File 'lib/chelsea/bom.rb', line 42 def random_urn_uuid "urn:uuid:#{SecureRandom.uuid}" end |
#to_s ⇒ Object
38 39 40 |
# File 'lib/chelsea/bom.rb', line 38 def to_s Ox.dump(@xml) end |
#xml ⇒ Object
34 35 36 |
# File 'lib/chelsea/bom.rb', line 34 def xml @xml ||= _get_xml end |