Class: Veye::Package::InfoCSV
- Defined in:
- lib/veye/views/package/info_csv.rb
Instance Method Summary collapse
- #format(result) ⇒ Object
-
#initialize ⇒ InfoCSV
constructor
A new instance of InfoCSV.
Methods inherited from BaseCSV
Constructor Details
#initialize ⇒ InfoCSV
Returns a new instance of InfoCSV.
6 7 8 9 |
# File 'lib/veye/views/package/info_csv.rb', line 6 def initialize headers = "name,version,language,prod_key,licence,prod_type,description,link,cves" super(headers) end |
Instance Method Details
#format(result) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/veye/views/package/info_csv.rb', line 10 def format(result) vulns = result['security_vulnerabilities'].to_a.map {|x| x['name_id']}.join(';') printf("%s,%s,%s,%s,%s,%s,%s,'%s',%s\n", result["name"], result["version"], result["language"], result["prod_key"], result["license"], result["prod_type"], result["link"], result["description"], vulns) end |