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

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

php - HTTP_REFERER woes: How can I allow access to a specific page, only when a visitor has visited another specific page beforehand? -

java Extracting Zip file -