Skip to content

Instantly share code, notes, and snippets.

@kylebragger
Last active November 4, 2017 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylebragger/4733507 to your computer and use it in GitHub Desktop.
Save kylebragger/4733507 to your computer and use it in GitHub Desktop.
VOWELS = %w[a e o u]
CONS = ('a'..'z').to_a - VOWELS
len = 5
phrase = (1..len).inject([]) {|prod,i|
prod << (i.even? ? VOWELS.sample : CONS.sample)
}.join('')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment