Class: Git::Lint::CLI::Actions::Hook
- Inherits:
-
Object
- Object
- Git::Lint::CLI::Actions::Hook
- Defined in:
- lib/git/lint/cli/actions/hook.rb
Overview
Handles unsaved Git commit action.
Instance Method Summary collapse
- #call(path) ⇒ Object
-
#initialize(analyzer: Analyzer.new, **dependencies) ⇒ Hook
constructor
A new instance of Hook.
Constructor Details
Instance Method Details
#call(path) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/git/lint/cli/actions/hook.rb', line 16 def call path analyzer.call commits: [repository.unsaved(path)] do |collector, reporter| kernel.puts reporter kernel.abort if collector.errors? end end |