blob: b7af6ea17c3d1555ddf7b227946dc0f89bd4e3a5 (
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
|
# frozen_string_literal: true
module Gitlab
module Ci
module Reports
module Sbom
class Source
attr_reader :source_type, :data
def initialize(type:, data:)
@source_type = type
@data = data
end
def source_file_path
data.dig('source_file', 'path')
end
def input_file_path
data.dig('input_file', 'path')
end
def packager
data.dig('package_manager', 'name')
end
def language
data.dig('language', 'name')
end
end
end
end
end
end
|