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



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

def base_matcher
  @base_matcher
end

Instance Method Details

#matches_text?(text) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
9
# File 'lib/license_finder/license/header_matcher.rb', line 6

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