Module: GitWand::CLI::Command

Defined in:
lib/git_wand/cli/command.rb,
lib/git_wand/cli/command/create_repository.rb,
lib/git_wand/cli/command/current_user_info.rb,
lib/git_wand/cli/command/delete_repository.rb

Defined Under Namespace

Modules: CreateRepository, CurrentUserInfo, DeleteRepository

Class Method Summary collapse

Class Method Details

.perform(arguments:, client:) ⇒ Object


9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/git_wand/cli/command.rb', line 9

def self.perform(arguments:, client:)
  case arguments[:command]
  when :current_user_info
    CurrentUserInfo.perform(client: client)
  when :create_repository
    CreateRepository.perform(client: client, repository_name: arguments[:repository_name], private: arguments[:private])
  when :delete_repository
    DeleteRepository.perform(client: client, repository_name: arguments[:repository_name])
  else
    puts "Command `#{arguments[:command]}` is not recognized."
    exit 1
  end
end