Sha256: f4d459d04aa6000245862c5ff352d2a6600bd5b77829dde687f8ae0e4888fd37

Contents?: true

Size: 264 Bytes

Versions: 28

Compression:

Stored size: 264 Bytes

Contents

# frozen_string_literal: true

module LicenseFinder
  class License
    HeaderMatcher = Struct.new(:base_matcher) do
      def matches_text?(text)
        header = text.split("\n").first || ''
        base_matcher.matches_text?(header)
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
license_finder-6.7.0 lib/license_finder/license/header_matcher.rb
license_finder-6.6.2 lib/license_finder/license/header_matcher.rb
license_finder-6.6.1 lib/license_finder/license/header_matcher.rb
license_finder-6.6.0 lib/license_finder/license/header_matcher.rb
license_finder-6.5.0 lib/license_finder/license/header_matcher.rb
license_finder-6.4.0 lib/license_finder/license/header_matcher.rb
license_finder-6.3.0 lib/license_finder/license/header_matcher.rb
license_finder-6.2.0 lib/license_finder/license/header_matcher.rb
license_finder-6.1.2 lib/license_finder/license/header_matcher.rb
license_finder-6.1.0 lib/license_finder/license/header_matcher.rb
license_finder-6.0.0 lib/license_finder/license/header_matcher.rb
license_finder-5.11.1 lib/license_finder/license/header_matcher.rb
license_finder-5.11.0 lib/license_finder/license/header_matcher.rb
license_finder-5.10.2 lib/license_finder/license/header_matcher.rb
license_finder-5.10.1 lib/license_finder/license/header_matcher.rb
license_finder-5.10.0 lib/license_finder/license/header_matcher.rb
license_finder-5.9.2 lib/license_finder/license/header_matcher.rb
license_finder-5.9.1 lib/license_finder/license/header_matcher.rb
license_finder-5.9.0 lib/license_finder/license/header_matcher.rb
license_finder-5.8.0 lib/license_finder/license/header_matcher.rb