Sha256: a8c2d5b6038953c6e7501bb972088bed23e6d5e3cf4a972b8f3a22897ba4e9b8
Contents?: true
Size: 435 Bytes
Versions: 1
Compression:
Stored size: 435 Bytes
Contents
module Licensee module Matchers # Matches README files that include a license by reference class Reference < Licensee::Matchers::Matcher 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 def confidence 90 end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
licensee-9.11.0 | lib/licensee/matchers/reference.rb |