Class: Licensee::Matchers::Reference
- Defined in:
- lib/licensee/matchers/reference.rb
Overview
Matches README files that include a license by reference
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
14 15 16 |
# File 'lib/licensee/matchers/reference.rb', line 14 def confidence 90 end |
#match ⇒ Object
7 8 9 10 11 12 |
# File 'lib/licensee/matchers/reference.rb', line 7 def match potential_matches.find do |license| title_or_source = [license.title_regex, license.source_regex].compact /\b#{Regexp.union(title_or_source)}\b/ =~ file.content end end |