Class: Git::Lint::Analyzer

Inherits:
Object
  • Object
show all
Defined in:
lib/git/lint/analyzer.rb

Overview

Runs all analyzers.

Constant Summary collapse

DELEGATES =
[Analyzers::Commits::Sole, Analyzers::Commits::Many].freeze

Instance Method Summary collapse

Constructor Details

#initialize(reporter: Reporters::Branch, delegates: DELEGATES) ⇒ Analyzer

Returns a new instance of Analyzer.



13
14
15
16
17
# File 'lib/git/lint/analyzer.rb', line 13

def initialize(reporter: Reporters::Branch, delegates: DELEGATES, **)
  super(**)
  @reporter = reporter
  @delegates = delegates
end

Instance Method Details

#call(commits = Core::EMPTY_ARRAY) ⇒ Object



19
20
21
22
# File 'lib/git/lint/analyzer.rb', line 19

def call commits = Core::EMPTY_ARRAY
  process commits
  reporter.new total: collector.total
end