Class: Licensee::ExactMatcher

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

Instance Attribute Summary

Attributes inherited from Matcher

#file

Instance Method Summary collapse

Methods inherited from Matcher

#initialize, match

Constructor Details

This class inherits a constructor from Licensee::Matcher

Instance Method Details

#confidenceObject



7
8
9
# File 'lib/licensee/matchers/exact_matcher.rb', line 7

def confidence
  100
end

#matchObject



3
4
5
# File 'lib/licensee/matchers/exact_matcher.rb', line 3

def match
  Licensee.licenses.find { |l| l.body_normalized == file.content_normalized }
end