# File lib/god/contact.rb, line 8 def self.generate(kind) sym = kind.to_s.capitalize.gsub(/_(.)/){$1.upcase}.intern c = God::Contacts.const_get(sym).new unless c.kind_of?(Contact) abort "Contact '#{c.class.name}' must subclass God::Contact" end c rescue NameError raise NoSuchContactError.new("No Contact found with the class name God::Contacts::#{sym}") end