Created
July 13, 2013 18:25
-
-
Save djcp/5991688 to your computer and use it in GitHub Desktop.
My daughter and I noodling around with ruby made a ridiculously cute random string generator
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
adjectives = %w|fluffy baby cuddly cute a"roar"able fuzzy teeny| | |
nouns = %w|bukkit whale turtle bunny kitten tiger cub duck unicorn monkey corgi panda| | |
verbs = %w|sleeping stretching cuddling meowing crying eating barking scratching purring nuzzling| | |
adjective_count = (1..2).to_a | |
20.times { | |
chosen_words = [] | |
adjective_count.sample.times { | |
chosen_words << adjectives.sample | |
} | |
chosen_words << nouns.sample | |
if Random.rand > 0.5 | |
chosen_words << verbs.sample | |
end | |
puts chosen_words.uniq.compact.join(' ') | |
} |
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
fuzzy panda scratching | |
baby fluffy bunny sleeping | |
a"roar"able tiger | |
fuzzy cuddly kitten eating | |
fluffy baby panda | |
a"roar"able tiger barking | |
a"roar"able fluffy cub cuddling | |
cute kitten purring | |
teeny unicorn sleeping | |
fluffy cute monkey | |
a"roar"able teeny monkey scratching | |
a"roar"able tiger | |
fuzzy duck cuddling | |
cuddly fuzzy monkey | |
fluffy kitten | |
fluffy whale | |
teeny tiger | |
teeny panda | |
fluffy corgi nuzzling | |
fluffy cuddly bunny eating |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment