class String ALPHABET = ('a'..'z').to_a VOWELS = %w(a e i o u) CONSONANTS = ALPHABET - VOWELS def namna_sub case self when '?' ALPHABET.sample when '*' VOWELS.sample when '#' CONSONANTS.sample else self end end end