WpItem::Vulnerable specs

This commit is contained in:
erwanlr
2013-03-25 20:30:26 +01:00
parent 95041945ff
commit d946ef55a8
12 changed files with 112 additions and 49 deletions

View File

@@ -1,17 +1,11 @@
# encoding: UTF-8
class WpItem
# moved this into the module ?
def vulns_file=(file)
if File.exists?(file)
@vulns_file = file
else
raise "The file #{file} does not exist"
end
end
module Vulnerable
attr_accessor :vulns_file, :vulns_xpath
# Get the vulnerabilities associated to the WpItem
#
# @return [ Vulnerabilities ]
def vulnerabilities
xml = xml(vulns_file)
@@ -23,4 +17,5 @@ class WpItem
vulnerabilities
end
end
end