Created
October 26, 2016 14:18
-
-
Save barek2k2/0c8b96d08f1e855aee3fa0417f1ff62d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
o = [('A'..'Z')].map { |i| i.to_a }.flatten | |
string = (0...2).map { o[rand(o.length)] }.join + rand(100..999).to_s | |
# this is not 100% accurate to gurantee that the same name wont be assigned twice but the chances are very low | |
# if we want to make 100% sure of uniqness then we must use the database to keep track |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment