class Licensee::Matchers::Reference

Matches README files that include a license by reference

Public Instance Methods

confidence() click to toggle source
# File lib/licensee/matchers/reference.rb, line 14
def confidence
  90
end
match() click to toggle source
# 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