Class: Licensee::Matchers::Package

Inherits:
Object
  • Object
show all
Defined in:
lib/licensee/matchers/package_matcher.rb

Direct Known Subclasses

Cran, DistZilla, Gemspec, NpmBower

Instance Method Summary collapse

Constructor Details

#initialize(file) ⇒ Package

Returns a new instance of Package.



4
5
6
# File 'lib/licensee/matchers/package_matcher.rb', line 4

def initialize(file)
  @file = file
end

Instance Method Details

#confidenceObject



12
13
14
# File 'lib/licensee/matchers/package_matcher.rb', line 12

def confidence
  90
end

#matchObject



8
9
10
# File 'lib/licensee/matchers/package_matcher.rb', line 8

def match
  Licensee.licenses(hidden: true).find { |l| l.key == license_property }
end