Method: RedisRing::CLI#run

Defined in:
lib/redis_ring/cli.rb

#runObject



13
14
15
16
17
18
19
20
21
22
# File 'lib/redis_ring/cli.rb', line 13

def run
  command = argv[0]
  if command.nil? || !COMMANDS.include?(command.to_sym)
    usage
    exit(1)
  else
    send(command, *argv[1..-1])
    exit(0)
  end
end