Class: Git::Lint::CLI::Actions::Hook
- Inherits:
-
Sod::Action
- Object
- Sod::Action
- 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) ⇒ Hook
constructor
A new instance of Hook.
Constructor Details
Instance Method Details
#call(path) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/git/lint/cli/actions/hook.rb', line 23 def call path analyzer.call commits: commits(path) do |collector, reporter| io.puts reporter kernel.abort if collector.errors? end end |