Class: MGit::CommandManager

Inherits:
Object
  • Object
show all
Defined in:
lib/m-git/command_manager.rb

Class Method Summary collapse

Class Method Details

.[](cmd) ⇒ Object



15
16
17
# File 'lib/m-git/command_manager.rb', line 15

def [](cmd)
  class_with_command(cmd)
end

.class_with_command(cmd) ⇒ Object



19
20
21
# File 'lib/m-git/command_manager.rb', line 19

def class_with_command(cmd)
  commands[cmd]
end

.commandsObject

cmd generate



7
8
9
# File 'lib/m-git/command_manager.rb', line 7

def commands
  @commands ||= {}
end

.register_command(cmd, cls) ⇒ Object



11
12
13
# File 'lib/m-git/command_manager.rb', line 11

def register_command(cmd, cls)
  commands[cmd] = cls
end