Just a friendly tip: alphabet really shouldn't be a class variable @@, they are very seldom what you want in Ruby:
In this specific case a constant would be the most common:
ALPHABET = ('a'..'z').to_a
Ah okay gotcha, thank ya for the tip!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.