Class: Licensee::Matchers::Package
- Inherits:
-
Matcher
- Object
- Matcher
- Licensee::Matchers::Package
show all
- Defined in:
- lib/licensee/matchers/package.rb
Instance Attribute Summary
Attributes inherited from Matcher
#file
Instance Method Summary
collapse
Methods inherited from Matcher
#initialize
Instance Method Details
#confidence ⇒ Object
13
14
15
|
# File 'lib/licensee/matchers/package.rb', line 13
def confidence
90
end
|
#license_property ⇒ Object
17
18
19
|
# File 'lib/licensee/matchers/package.rb', line 17
def license_property
raise 'Not implemented'
end
|
#match ⇒ Object
4
5
6
7
8
9
10
11
|
# File 'lib/licensee/matchers/package.rb', line 4
def match
return @match if defined? @match
return if license_property.nil? || license_property.to_s.empty?
@match = Licensee.licenses(hidden: true).find do |license|
license.key == license_property
end
@match ||= License.find('other')
end
|