Method: Commandant.add_alias

Defined in:
lib/commandant.rb

.add_alias(commands) ⇒ Object

Creates an alias for each given command.

Examples:

alias :br => :branch, :co => :checkout


31
32
33
34
35
# File 'lib/commandant.rb', line 31

def add_alias(commands)
  commands.each do |new, old|
    Commandant::COMMANDS[new] = Commandant::COMMANDS[old]
  end
end