Class: Spandx::Core::LicensePlugin
- Defined in:
- lib/spandx/core/license_plugin.rb
Instance Method Summary collapse
- #enhance(dependency) ⇒ Object
-
#initialize(catalogue: Spdx::Catalogue.default) ⇒ LicensePlugin
constructor
A new instance of LicensePlugin.
Methods inherited from Plugin
Methods included from Registerable
#all, #each, #inherited, #registry
Constructor Details
Instance Method Details
#enhance(dependency) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/spandx/core/license_plugin.rb', line 10 def enhance(dependency) package_manager = package_manager_for(dependency) return dependency unless known?(package_manager) return (dependency) if available_in?(dependency.) licenses_for(dependency).each do |text| dependency.licenses << @guess.license_for(text) end dependency end |