Class: Spandx::Java::Parsers::Maven
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/java/parsers/maven.rb', line 7
def match?(path)
path.basename.fnmatch?('pom.xml')
end
|
#parse(path) ⇒ Object
11
12
13
14
15
16
|
# File 'lib/spandx/java/parsers/maven.rb', line 11
def parse(path)
document = Nokogiri.XML(path.read).tap(&:remove_namespaces!)
document.search('//project/dependencies/dependency').map do |node|
map_from(path, node)
end
end
|