Class: GitlabCodeownersChecker::Checkers::NoOwner
- Inherits:
-
Object
- Object
- GitlabCodeownersChecker::Checkers::NoOwner
- Defined in:
- lib/gitab_codeowners_checker/checkers/no_owner.rb
Instance Method Summary collapse
- #files_without_owner ⇒ Object
-
#initialize(files:, codeowners:) ⇒ NoOwner
constructor
A new instance of NoOwner.
Constructor Details
#initialize(files:, codeowners:) ⇒ NoOwner
Returns a new instance of NoOwner.
8 9 10 11 |
# File 'lib/gitab_codeowners_checker/checkers/no_owner.rb', line 8 def initialize(files:, codeowners:) @files = files @codeowners = codeowners end |
Instance Method Details
#files_without_owner ⇒ Object
13 14 15 16 17 |
# File 'lib/gitab_codeowners_checker/checkers/no_owner.rb', line 13 def files_without_owner @files_without_owner ||= @files.each_with_object([]) do |f, acc| acc.push(f) unless @codeowners.patterns.find { |p| p.match?(f) } end end |