blob: 51fa8ce0d2e28513af148f5f4f871ad146153e83 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# 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 valid?
errors.empty?
end
def add_error(error)
errors << error
end
def set_source(source)
self.source = source
end
def add_component(component)
components << component
end
private
attr_writer :source
end
end
end
end
end
|