Last active
August 29, 2015 13:56
-
-
Save RichardJordan/9059127 to your computer and use it in GitHub Desktop.
Create haiku name, heroku-style, for sign-up process
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
module FormUtilities | |
module GenerateHaikuName | |
attr_reader :haiku_name | |
ADJS = [ | |
"autumn", "hidden", "bitter", "misty", "silent", "empty", "dry", "dark", | |
"summer", "icy", "delicate", "quiet", "white", "cool", "spring", "winter", | |
"patient", "twilight", "dawn", "crimson", "wispy", "weathered", "blue", | |
"billowing", "broken", "cold", "damp", "falling", "frosty", "green", | |
"long", "late", "lingering", "bold", "little", "morning", "muddy", "old", | |
"red", "rough", "still", "small", "sparkling", "throbbing", "shy", | |
"wandering", "withered", "wild", "black", "young", "holy", "solitary", | |
"fragrant", "aged", "snowy", "proud", "floral", "restless", "divine", | |
"polished", "ancient", "purple", "lively", "nameless" | |
] | |
NOUNS = [ | |
"waterfall", "river", "breeze", "moon", "rain", "wind", "sea", "morning", | |
"snow", "lake", "sunset", "pine", "shadow", "leaf", "dawn", "glitter", | |
"forest", "hill", "cloud", "meadow", "sun", "glade", "bird", "brook", | |
"butterfly", "bush", "dew", "dust", "field", "fire", "flower", "firefly", | |
"feather", "grass", "haze", "mountain", "night", "pond", "darkness", | |
"snowflake", "silence", "sound", "sky", "shape", "surf", "thunder", | |
"violet", "water", "wildflower", "wave", "water", "resonance", "sun", | |
"wood", "dream", "cherry", "tree", "fog", "frost", "voice", "paper", | |
"frog", "smoke", "star" | |
] | |
private | |
def create_haiku_name | |
@haiku_name = "#{ADJS.sample}-#{NOUNS.sample}-#{rand(1..1024)}" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment