Class: Veye::Project::LicencePretty

Inherits:
BasePretty show all
Defined in:
lib/veye/views/project/licence_pretty.rb

Instance Method Summary collapse

Methods inherited from BasePretty

#after, #before

Instance Method Details

#format(results) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/veye/views/project/licence_pretty.rb', line 7

def format(results)
  return if results.nil?
  n = 1
  results["licenses"].each_pair do |licence, products|
    product_keys = products.map {|prod| prod["prod_key"]}
    licence_name = "#{licence}".color(:green).bright
    printf("%3d - %s\n", n, licence_name)
    printf("\t%-15s : %s\n", "Products", product_keys.join(", "))

    n += 1
  end
end