morse code encoder written in ruby