python - How does this Ruby code work? -
class random < dictionary def vowels = ["a","e","i","o","u"] line = file.readlines(file.join(turboname::path, 'dictionary.txt'))[rand(435000)-1].gsub("\n","") jfoojiojefjo faj zdnfnfsmfke u suck shit +91 29234 23492343 baba ji stackoverflow sucks rand(20).times line = line.gsub(vowels.shuffle.first, vowels.shuffle.first) end line end end i trying convert code python. that, know code in ruby. can explain get method in plain english?
the code here: https://github.com/megoforce/turboname
i believe code reading random line out of file, swapping around vowels in line 20 times.
Comments
Post a Comment