Class: Ace::Git::Worktree::CLI::Commands::Create

Inherits:
Support::Cli::Command
  • Object
show all
Includes:
SharedHelpers
Defined in:
lib/ace/git/worktree/cli/commands/create.rb

Instance Method Summary collapse

Instance Method Details

#call(branch: nil, **options) ⇒ Object



61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/ace/git/worktree/cli/commands/create.rb', line 61

def call(branch: nil, **options)
  display_config_summary("create", options)

  # Convert --from to --source for the underlying command
  if options[:from]
    options[:source] = options.delete(:from)
  end

  # Convert ace-support-cli options hash to args array format
  args = options_to_args(options)
  args << branch if branch

  Ace::Git::Worktree::Commands::CreateCommand.new.run(args)
end