Include a parameterized dynamic module in a namespace and get a full LDAP class hierarchy at your disposal.
Tim Pope
gem "ldaptic", "~> 0.2.2"