Class: LicenseFinder::PubPackage

Inherits:
Package
  • Object
show all
Defined in:
lib/license_finder/packages/pubspec_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

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 = {}) ⇒ PubPackage

Returns a new instance of PubPackage.



5
6
7
8
# File 'lib/license_finder/packages/pubspec_package.rb', line 5

def initialize(name, version, license_text, options = {})
  super(name, version, options)
  @license = License.find_by_text(license_text.to_s)
end

Instance Method Details

#licenses_from_specObject



10
11
12
# File 'lib/license_finder/packages/pubspec_package.rb', line 10

def licenses_from_spec
  [@license].compact
end

#package_managerObject



14
15
16
# File 'lib/license_finder/packages/pubspec_package.rb', line 14

def package_manager
  'Pub'
end