An implementation of the Ring Algorithm using Ruby. The ring algorithm is one of the algorithms used to determine the leader in a distributed system in a process called Leader Election.
This implementation makes the following assumptions:
- The nodes are connected in a logical ring.
- Each process knows its successor.
- Initially, all the processes know the coordinator.
- The process id of the current process is 4.
- The process id of the successor is obtained by adding 1 to the current process id.