base.rb

Path: lib/activeldap/base.rb
Last Update: Mon May 22 00:12:47 IST 2006

ActiveLDAP - an OO-interface to LDAP objects inspired by ActiveRecord

Author: Will Drewry <will@alum.bu.edu> License: See LICENSE and COPYING.txt Copyright 2004-2006 Will Drewry <will@alum.bu.edu> Some portions Copyright 2006 Google Inc

Summary

ActiveLDAP lets you read and update LDAP entries in a completely object oriented fashion, even handling attributes with multiple names seamlessly. It was inspired by ActiveRecord so extending it to deal with custom LDAP schemas is as effortless as knowing the ‘ou’ of the objects, and the primary key. (fix this up some)

Example

  irb> require 'activeldap'
  > true
  irb> user = ActiveLDAP::User.new("drewry")
  > #<ActiveLDAP::User:0x402e...
  irb> user.cn
  > "foo"
  irb> user.commonname
  > "foo"
  irb> user.cn = "Will Drewry"
  > "Will Drewry"
  irb> user.cn
  > "Will Drewry"
  irb> user.validate
  > nil
  irb> user.write

Required files

ldap   ldap/schema   log4r  

[Validate]