[LRUG] Ruby random cool word generator

Tom Taylor tom at tomtaylor.co.uk
Thu Nov 13 03:39:30 PST 2008


On 13 Nov 2008, at 11:32, James Smith wrote:

> There are so many name generators out there, some of those must have
> dictionaries that could be re-used, or even code that could be quickly
> adapted. Would be nice to have a gem that generated names from a
> dictionary, or set of dictionaries.

I've had good experience with the Ruby port of the Perl library, Faker:

http://faker.rubyforge.org/rdoc/

Faker::Internet.user_name might do what you want:

irb(main):009:0> 5.times { puts Faker::Internet.user_name }
neha.kshlerin
gerard
tre.bayer
garnet.konopelski
ross




More information about the Chat mailing list