Class: Git::Lint::CLI::Actions::Analyze::Commit

Inherits:
Sod::Action
  • Object
show all
Defined in:
lib/git/lint/cli/actions/analyze/commit.rb

Overview

Handles analyze action for single commit SHA

Instance Method Summary collapse

Constructor Details

#initialize(analyzer: Analyzer.new) ⇒ Commit

Returns a new instance of Commit.



18
19
20
21
# File 'lib/git/lint/cli/actions/analyze/commit.rb', line 18

def initialize(analyzer: Analyzer.new, **)
  super(**)
  @analyzer = analyzer
end

Instance Method Details

#call(*arguments) ⇒ Object



23
24
25
26
27
28
# File 'lib/git/lint/cli/actions/analyze/commit.rb', line 23

def call *arguments
  process arguments.unshift "-1"
rescue Errors::Base => error
  logger.error { error.message }
  kernel.abort
end