Skip to content

Instantly share code, notes, and snippets.

@domgetter
Last active August 29, 2015 14:07

Revisions

  1. domgetter revised this gist Oct 17, 2014. 1 changed file with 2 additions and 6 deletions.
    8 changes: 2 additions & 6 deletions rubyfy
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,3 @@
    getRandomConsonant
    randLetter = (rand(25)+97).chr
    while (isCharVowel(randLetter)) do
    randLetter = (rand(25)+97).chr
    end
    return randLetter
    def random_consonant
    ([*"b".."z"] - ["e", "i", "o", "u"]).sample
    end
  2. José Ignacio Amelivia Santiago created this gist Oct 17, 2014.
    7 changes: 7 additions & 0 deletions rubyfy
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    getRandomConsonant
    randLetter = (rand(25)+97).chr
    while (isCharVowel(randLetter)) do
    randLetter = (rand(25)+97).chr
    end
    return randLetter
    end