def process_command(cmd, args)
      commands.each do |command, options|
        if (options[:case_sensitive]  && cmd == command) ||
           (!options[:case_sensitive] && cmd.downcase == command.downcase)
          #return options[:block].call(args)
          return instance_exec(args, &options[:block])
        end
      end
      throw :command_not_found
    end
def process_command(cmd, args)
      commands.each do |command, options|
        if (options[:case_sensitive]  && cmd == command) ||
           (!options[:case_sensitive] && cmd.downcase == command.downcase)
          #return options[:block].call(args)
          return instance_exec(args, &options[:block])
        end
      end
      throw :command_not_found
    end
Searches for a command matching cmd and returns the result of running its block.
 If the command is not found, process_command throws :command_not_found.