# File lib/activeldap/associations.rb, line 16
     def ldap_mapping(options = {})
       # The immediate ancestor should be the caller....
       klass = self.ancestors[0]

       dnattr = options[:dnattr] || 'cn'
       prefix = options[:prefix] || "ou=#{klass.to_s.split(':').last}"
       classes_array = options[:classes] || ['top']

       raise TypeError, ":classes must be an array" \
         unless classes_array.respond_to? :size
       # Build classes array
       classes = '['
       classes_array.map! {|x| x = "'#{x}'"}
       classes << classes_array.join(', ')
       classes << ']'

       # This adds the methods to the local
       # class which can then be inherited, etc
       # which describe the mapping to LDAP.
       klass.class_eval "class << \#{klass}\n\# Return the list of required object classes\ndef required_classes\n\#{classes}\nend\n\n\# Return the full base of the class\ndef base\n\"\#{prefix},\\\#{super}\"\nend\n\n\# Return the expected DN attribute of an object\ndef dnattr\n'\#{dnattr}'\nend\nend\n\n\# Hide connect\nprivate_class_method :connect\n\n\# Unhide class methods\npublic_class_method :find_all\npublic_class_method :find\npublic_class_method :new\npublic_class_method :dnattr\n"
     end