Sha256: ba281241f849e8f54bb7bee53f9a0dcddb10d93f2ffb0349484ae0c7877cb472
Contents?: true
Size: 492 Bytes
Versions: 1
Compression:
Stored size: 492 Bytes
Contents
# frozen_string_literal: true require_relative './pattern' module GitlabCodeownersChecker class CodeownersFile def initialize(path) @path = path end attr_reader :path def patterns @patterns ||= begin File.readlines(@path).each_with_object([]) do |line, acc| acc.push(Pattern.from_file_line(line)) if contains_pattern?(line) end end end private def contains_pattern?(str) str.include?('@') end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gitab_codeowners_checker-0.1.0 | lib/gitab_codeowners_checker/codeowners_file.rb |