Class: Spandx::Os::Parsers::Apk
Constant Summary
Constants inherited
from Core::Parser
Core::Parser::UNKNOWN
Instance Method Summary
collapse
for, parse
#all, #each, #inherited, #registry
Instance Method Details
#match?(path) ⇒ Boolean
7
8
9
|
# File 'lib/spandx/os/parsers/apk.rb', line 7
def match?(path)
path.basename.fnmatch?('installed')
end
|
#parse(lockfile) ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/spandx/os/parsers/apk.rb', line 11
def parse(lockfile)
path = lockfile.to_s
[].tap do |items|
lockfile.open(mode: 'r') do |io|
each_package(io) do |data|
items.push(map_from(data, path))
end
end
end
end
|