lib/cms_scanner/vulnerability.rb in cms_scanner-0.0.34 vs lib/cms_scanner/vulnerability.rb in cms_scanner-0.0.35

- old
+ new

@@ -1,12 +1,14 @@ -require 'cms_scanner/vulnerability/references' +require 'cms_scanner/references' module CMSScanner # Generic Vulnerability class Vulnerability - attr_reader :title, :references, :type, :fixed_in + include References + attr_reader :title, :type, :fixed_in + # @param [ String ] title # @param [ Hash ] references # @option references [ Array<String>, String ] cve # @option references [ Array<String>, String ] secunia # @option references [ Array<String>, String ] osvdb @@ -14,13 +16,14 @@ # @option references [ Array<String> ] url URL(s) to related advisories etc # @option references [ Array<String>, String ] metasploit The related metasploit module(s) # @param [ String ] type # @param [ String ] fixed_in def initialize(title, references = {}, type = nil, fixed_in = nil) - @title = title - @references = references - @type = type - @fixed_in = fixed_in + @title = title + @type = type + @fixed_in = fixed_in + + self.references = references end # param [ Vulnerability ] other # # @return [ Boolean ]