Skip to content

Instantly share code, notes, and snippets.

@soynog
Last active November 26, 2018 20:22
Show Gist options
  • Save soynog/83db6b1fda121510fd807baf64e15f74 to your computer and use it in GitHub Desktop.
Save soynog/83db6b1fda121510fd807baf64e15f74 to your computer and use it in GitHub Desktop.
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