Class: Veye::Project::LicenceTable
- Defined in:
- lib/veye/views/project/licence_table.rb
Instance Method Summary collapse
- #format(results) ⇒ Object
-
#initialize ⇒ LicenceTable
constructor
A new instance of LicenceTable.
Methods inherited from BaseTable
Constructor Details
#initialize ⇒ LicenceTable
Returns a new instance of LicenceTable.
6 7 8 9 |
# File 'lib/veye/views/project/licence_table.rb', line 6 def initialize headings = %w(index license product_keys) super("Licences", headings) end |
Instance Method Details
#format(results) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/veye/views/project/licence_table.rb', line 10 def format(results) items = results['licenses'] return if items.nil? n = 1 items.each_pair do |license, products| products.each do |prod| row = [n, license, prod["prod_key"]] @table << row end n += 1 end end |