k-Nearest Neighbors algorithm demonstration in Ruby