Skip to content

Instantly share code, notes, and snippets.

@riethmayer
Created February 2, 2010 00:03
Show Gist options
  • Save riethmayer/292204 to your computer and use it in GitHub Desktop.
Save riethmayer/292204 to your computer and use it in GitHub Desktop.
# name.rb ;; 2010 (cc) Jan Riethmayer
# This work is licensend under a Creative Commons Attribution 3.0 license.
class Name
class << self
def parts
result = <<-NAMES
dev developer code arborium conservatory garden bit byte aid bot
open offen test behaviour mate rack ateer hash tree green grow
bloom karoshi flora keim flow forge former light nerds geeks rack
lab cultivation culture breed web mash restless awake less wheel
NAMES
result.gsub(/\n/," ").gsub(/ /," ").split(" ")
end
def compute
result = []
Name.parts.each do |n1|
Name.parts.each do |n2|
unless n1 == n2
result << "#{n1}#{n2}".capitalize
result << "#{n2}#{n1}".capitalize
end
end
end
result.uniq.sort
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment