Class: FIDIUS::CveDb::NvdEntry
- Inherits:
-
CveConnection
- Object
- ActiveRecord::Base
- CveConnection
- FIDIUS::CveDb::NvdEntry
- Defined in:
- lib/models/fidius/cve_db/nvd_entry.rb
Instance Method Summary collapse
Instance Method Details
#references_string ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/models/fidius/cve_db/nvd_entry.rb', line 12 def references_string res = "" vulnerability_references.each_with_index do |reference, i| # http://www.foo-bar.de/sub/sub-sub -> www.foo-bar.de link_name = reference.link.scan(/(?:https?|s?ftp):\/\/([^\/]+)/).to_s res += "<a href=\"#{reference.link}\">#{link_name}</a>" res += " | " unless i == vulnerability_references.size-1 end res end |