Skip to content

Instantly share code, notes, and snippets.

@dirceu
Created July 23, 2008 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dirceu/1945 to your computer and use it in GitHub Desktop.
Save dirceu/1945 to your computer and use it in GitHub Desktop.
# Author: Dirceu Pereira Tiegs <dirceutiegs@gmail.com>
#
# Script usado para gerar nomes de tavernas
#
class Array
def pick
self.sort_by {rand}[0]
end
end
animals = %w[ornitorrinco pato ganso rato coelho fuinha bisao boi touro vaca galinha galo gato bezerro cabra cao cachorro goblin orc dragao cubo\ gelatinoso fada fauno elfo elfa polvo esquilo passaro passarinho pinto cavalo canguru urso coala macaco gorila chimpanze garca]
adjectives = %w[manco cego caolho zarolho perneta esfomeado leproso defumado irritante molhado sadio comilao barulhento santo]
10.times do |n|
puts "#{animals.pick.capitalize} #{adjectives.pick.capitalize}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment