35 lines
623 B
Ruby
35 lines
623 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
module Gitlab
|
||
|
module Ci
|
||
|
module Reports
|
||
|
module Sbom
|
||
|
class Report
|
||
|
attr_reader :components, :source, :errors
|
||
|
|
||
|
def initialize
|
||
|
@components = []
|
||
|
@errors = []
|
||
|
end
|
||
|
|
||
|
def add_error(error)
|
||
|
errors << error
|
||
|
end
|
||
|
|
||
|
def set_source(source)
|
||
|
self.source = Source.new(source)
|
||
|
end
|
||
|
|
||
|
def add_component(component)
|
||
|
components << Component.new(component)
|
||
|
end
|
||
|
|
||
|
private
|
||
|
|
||
|
attr_writer :source
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|