Method: LicenseFinder::Logger::Base#activation

Defined in:
lib/license_finder/logger.rb

#activation(activation) ⇒ Object



31
32
33
34
35
36
37
38
39
40
# File 'lib/license_finder/logger.rb', line 31

def activation activation
  preamble = sprintf("package %s:", activation.package.name)
  if activation.sources.empty?
    log activation.package.class, sprintf("%s no licenses found", preamble)
  else
    activation.sources.each do |source|
      log activation.package.class, sprintf("%s found license '%s' %s", preamble, activation.license.name, source)
    end
  end
end