Method: Ldaptic.Module

Defined in:
lib/ldaptic.rb

.Module(options = {}) ⇒ Object

Similar to Ldaptic::Class, accepting the same options. Instead of returning an anonymous class that activates upon inheritance, it returns an anonymous module that activates upon inclusion.

module MyCompany
  include Ldaptic::Module(options)
  # This class and many others are created automatically based on
  # information from the server.
  class User
    alias  sAMAccountName
  end
end

me = MyCompany.search(:filter => {:cn => "Name, My"}).first
puts me.


78
79
80
# File 'lib/ldaptic.rb', line 78

def self.Module(options={})
  Ldaptic::Module.new(options)
end