Class: Licensee::CopyrightMatcher

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

Constant Summary collapse

REGEX =
/\A(Copyright|Copyright ©|Copyright \(c\)) \d{4}.*?\n?\z/i

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



10
11
12
# File 'lib/licensee/matchers/copyright_matcher.rb', line 10

def confidence
  100
end

#matchObject



6
7
8
# File 'lib/licensee/matchers/copyright_matcher.rb', line 6

def match
  no_license if file.content.strip =~ REGEX
end