Support multiple references
This commit is contained in:
@@ -31,7 +31,7 @@ class Vulnerable
|
||||
xml.xpath(@vulns_xpath).each do |node|
|
||||
vulnerabilities << WpVulnerability.new(
|
||||
node.search("title").text,
|
||||
node.search("reference").text,
|
||||
node.search("reference").map(&:text),
|
||||
node.search("type").text
|
||||
)
|
||||
end
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
#++
|
||||
|
||||
class WpVulnerability
|
||||
attr_accessor :title, :reference, :type
|
||||
attr_accessor :title, :references, :type
|
||||
|
||||
def initialize(title, reference, type)
|
||||
def initialize(title, references, type)
|
||||
@title = title
|
||||
@reference = reference
|
||||
@references = references
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user