Sha256: ac1e3f691d2692823a152e3962f4fcb0a540cf91ef30ab6d6a3cc04f999bd84a
Contents?: true
Size: 393 Bytes
Versions: 18
Compression:
Stored size: 393 Bytes
Contents
# frozen_string_literal: true module LicenseFinder class License HeaderMatcher = Struct.new(:base_matcher, :first_n_lines) do def matches_text?(text) n = if first_n_lines.nil? 1 else first_n_lines end header = text.lines.first(n).join || '' base_matcher.matches_text?(header) end end end end
Version data entries
18 entries across 18 versions & 2 rubygems