Last active
November 26, 2018 20:22
-
-
Save soynog/83db6b1fda121510fd807baf64e15f74 to your computer and use it in GitHub Desktop.
This file contains 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
NAME_PARTS = { | |
stems: ["Name", "Bloop", "Fake", "Spoof", "Glorp", "Madeup", "Foob", "Silly", | |
"Snoop", "Bob", "Winkle", "Snarf", "Zapp", "Dogg", "Sneeez", "Beard"], | |
first_suffixes: ["y", "er", "o", ""], | |
last_name_prefixes: ["Mc", "Mac", "Van", "Von", "De", "Da", "O'", "", ""], | |
last_name_second_suffixes: ["pants", "face", "son", "ford", "noggin", "beard", "name", "dogg", "head"], | |
} | |
def fake_name_cleanup(str) | |
str.gsub('ee','e') | |
.gsub('yy','y') | |
end | |
def fake_first_name | |
fake_name_cleanup( | |
NAME_PARTS[:stems].sample + | |
NAME_PARTS[:first_suffixes].sample | |
) | |
end | |
def fake_last_name | |
fake_name_cleanup( | |
NAME_PARTS[:last_name_prefixes].sample + | |
NAME_PARTS[:stems].sample + | |
NAME_PARTS[:first_suffixes].sample + | |
NAME_PARTS[:last_name_second_suffixes].sample | |
) | |
end | |
def fake_name | |
fake_first_name + " " + fake_last_name | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment