Class: Veye::Package::InfoTable
- Defined in:
- lib/veye/views/package/info_table.rb
Instance Method Summary collapse
- #format(results) ⇒ Object
-
#initialize ⇒ InfoTable
constructor
A new instance of InfoTable.
Methods inherited from BaseTable
Constructor Details
#initialize ⇒ InfoTable
Returns a new instance of InfoTable.
6 7 8 9 |
# File 'lib/veye/views/package/info_table.rb', line 6 def initialize headings = %w(name version product_key language license description CVEs) super("Package information", headings) end |
Instance Method Details
#format(results) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/veye/views/package/info_table.rb', line 10 def format(results) result = results return if result.nil? vulns = result['security_vulnerabilities'].to_a.map {|x| x['name_id'] }.join(',') row = [result["name"], result["version"], result["prod_key"]] row << result["language"] row << result["license_info"] row << result["description"] row << vulns @table << row end |