Class: LicenseFinder::SpmPackage
- Defined in:
- lib/license_finder/packages/spm_package.rb
Instance Attribute Summary
Attributes inherited from Package
#authors, #children, #description, #groups, #homepage, #install_path, #license_names_from_spec, #logger, #manual_approval, #name, #package_url, #parents, #summary, #version
Instance Method Summary collapse
-
#initialize(name, version, license_text, options = {}) ⇒ SpmPackage
constructor
A new instance of SpmPackage.
- #licenses_from_spec ⇒ Object
- #package_manager ⇒ Object
Methods inherited from Package
#<=>, #activations, #approved?, #approved_manually!, #approved_manually?, #decide_on_license, #eql?, #hash, #license_files, license_names_from_standard_spec, #licenses, #licensing, #log_activation, #missing?, #notice_files, #permitted!, #permitted?, #restricted!, #restricted?
Constructor Details
#initialize(name, version, license_text, options = {}) ⇒ SpmPackage
Returns a new instance of SpmPackage.
5 6 7 8 |
# File 'lib/license_finder/packages/spm_package.rb', line 5 def initialize(name, version, license_text, = {}) super(name, version, ) @license = License.find_by_text(license_text.to_s) end |
Instance Method Details
#licenses_from_spec ⇒ Object
10 11 12 |
# File 'lib/license_finder/packages/spm_package.rb', line 10 def licenses_from_spec [@license].compact end |
#package_manager ⇒ Object
14 15 16 |
# File 'lib/license_finder/packages/spm_package.rb', line 14 def package_manager 'Spm' end |