Class: Licensee::Matchers::Exact
- Defined in:
- lib/licensee/matchers/exact.rb
Overview
Exact matcher that succeeds when the license file’s normalized wordset exactly matches a known license’s normalized wordset.
Constant Summary
Constants inherited from Matcher
Instance Attribute Summary
Attributes inherited from Matcher
Instance Method Summary collapse
Methods inherited from Matcher
Methods included from HashHelper
Constructor Details
This class inherits a constructor from Licensee::Matchers::Matcher
Instance Method Details
#confidence ⇒ Object
16 17 18 |
# File 'lib/licensee/matchers/exact.rb', line 16 def confidence 100 end |
#match ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/licensee/matchers/exact.rb', line 8 def match return @match if defined? @match @match = potential_matches.find do |potential_match| potential_match.wordset == file.wordset end end |