Class: LicenseFinder::License::HeaderMatcher

Inherits:
Struct
  • Object
show all
Defined in:
lib/license_finder/license/header_matcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#base_matcherObject

Returns the value of attribute base_matcher

Returns:

  • (Object)

    the current value of base_matcher



3
4
5
# File 'lib/license_finder/license/header_matcher.rb', line 3

def base_matcher
  @base_matcher
end

Instance Method Details

#matches_text?(text) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
7
# File 'lib/license_finder/license/header_matcher.rb', line 4

def matches_text?(text)
  header = text.split("\n").first || ''
  base_matcher.matches_text?(header)
end