Class: Ace::GitCommit::CLI::Commands::Commit

Inherits:
Support::Cli::Command
  • Object
show all
Includes:
Support::Cli::Base
Defined in:
lib/ace/git_commit/cli/commands/commit.rb

Overview

ace-support-cli Command class for the commit command

This command generates and executes git commits with LLM-generated or user-provided messages, maintaining complete parity with the Thor implementation.

Instance Method Summary collapse

Instance Method Details

#call(**options) ⇒ Object



58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/ace/git_commit/cli/commands/commit.rb', line 58

def call(**options)
  # Extract files array from options (ace-support-cli passes args as :files)
  @files = Array(options[:files] || [])

  # Remove ace-support-cli specific keys (args is leftover arguments)
  @options = options.reject { |k, _| k == :files || k == :args }
  if @options[:version]
    puts "ace-git-commit #{Ace::GitCommit::VERSION}"
    return 0
  end

  execute
end