Class: Git::Lint::Analyzers::Commits::Many
- Inherits:
-
Object
- Object
- Git::Lint::Analyzers::Commits::Many
- Defined in:
- lib/git/lint/analyzers/commits/many.rb
Overview
Runs all analyzers for a single commit only.
Constant Summary collapse
- ANALYZERS =
[Analyzers::Commits::Subjects::Duplicate].freeze
Instance Method Summary collapse
- #call(commits = Core::EMPTY_ARRAY) ⇒ Object
-
#initialize(analyzers: ANALYZERS) ⇒ Many
constructor
A new instance of Many.
Constructor Details
#initialize(analyzers: ANALYZERS) ⇒ Many
Returns a new instance of Many.
15 16 17 18 |
# File 'lib/git/lint/analyzers/commits/many.rb', line 15 def initialize(analyzers: ANALYZERS, **) super(**) @analyzers = analyzers end |
Instance Method Details
#call(commits = Core::EMPTY_ARRAY) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/git/lint/analyzers/commits/many.rb', line 20 def call commits = Core::EMPTY_ARRAY analyzers.select { |analyzer| settings.public_send :"#{analyzer.id}_enabled" } .each { |analyzer| collector.add analyzer.new(commits) } collector end |