Support multiple references

This commit is contained in:
Christian Mehlmauer
2013-01-09 22:48:24 +01:00
parent 525491af89
commit a6ad818496
4 changed files with 20 additions and 9 deletions

View File

@@ -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

View File

@@ -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