def validate_command(cmd = ARGV)
      fail 'Specify one action.' unless cmd.count == 1
      cmd = cmd.shift
      fail 'Invalid action.' unless SUB_COMMANDS.include?(cmd)
      cmd
    end
def validate_command(cmd = ARGV)
      fail 'Specify one action.' unless cmd.count == 1
      cmd = cmd.shift
      fail 'Invalid action.' unless SUB_COMMANDS.include?(cmd)
      cmd
    end
Validate the given command.
 @param cmd [Array] only one command should be given.
 @return [String] extracts out of Array