Method: Hookify::Command.run_command

Defined in:
lib/hookify/command.rb

.run_command(command, args) ⇒ Object

Raises:



23
24
25
26
27
28
# File 'lib/hookify/command.rb', line 23

def run_command(command, args)
  klass, method = parse(command)
  runner = klass.new(args)
  raise InvalidCommand unless runner.respond_to?(method)
  runner.send(method)
end