# ===GLSAMaker v2 # Copyright (C) 2010 Alex Legler # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # For more information, see the LICENSE file. class Cpe < ActiveRecord::Base has_and_belongs_to_many :cves, :class_name => 'Cve' def split self.cpe.split(':') end def vendor split[2] end def product split[3] end def version split[4] end end