Class: ThreeScaleToolbox::Commands::RemoteCommand::RemoteAddSubcommand

Inherits:
Cri::CommandRunner
  • Object
show all
Includes:
ThreeScaleToolbox::Command
Defined in:
lib/3scale_toolbox/commands/remote_command/remote_add.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ThreeScaleToolbox::Command

#config, #config_file, #exit_with_message, #fetch_required_option, included, #keep_alive, #remotes, #threescale_client, #verbose, #verify_ssl

Class Method Details

.commandObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/3scale_toolbox/commands/remote_command/remote_add.rb', line 7

def self.command
  Cri::Command.define do
    name        'add'
    usage       'add <name> <url>'
    summary     'remote add'
    description 'Add new remote to the list'
    param       :remote_name
    param       :remote_url
    runner RemoteAddSubcommand
  end
end

Instance Method Details

#runObject



19
20
21
22
# File 'lib/3scale_toolbox/commands/remote_command/remote_add.rb', line 19

def run
  # 'arguments' cannot be converted to Hash
  add_remote arguments[:remote_name], arguments[:remote_url]
end