Class: AD::LDAP::Adapter
- Inherits:
-
Net::LDAP
- Object
- Net::LDAP
- AD::LDAP::Adapter
- Defined in:
- lib/ad-ldap/adapter.rb
Instance Attribute Summary (collapse)
-
- (Object) config
Returns the value of attribute config.
Instance Method Summary (collapse)
- - (Object) delete_attribute(dn, attribute)
-
- (Adapter) initialize(config)
constructor
A new instance of Adapter.
-
- (Object) open
don't raise when an open connection is already open, just yield it.
- - (Object) search(args = {})
Constructor Details
- (Adapter) initialize(config)
A new instance of Adapter
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/ad-ldap/adapter.rb', line 11 def initialize(config) self.config = config super({ :host => self.config.host, :port => self.config.port, :base => self.config.treebase, :encryption => self.config.encryption }) if self.config.auth self.auth(self.config.auth[:username], self.config.auth[:password]) end end |
Instance Attribute Details
- (Object) config
Returns the value of attribute config
9 10 11 |
# File 'lib/ad-ldap/adapter.rb', line 9 def config @config end |
Instance Method Details
- (Object) delete_attribute(dn, attribute)
47 48 49 50 51 |
# File 'lib/ad-ldap/adapter.rb', line 47 def delete_attribute(dn, attribute) result = super self.check_operation result end |
- (Object) open
don't raise when an open connection is already open, just yield it
25 26 27 28 29 30 31 |
# File 'lib/ad-ldap/adapter.rb', line 25 def open if @open_connection yield @open_connection else super end end |
- (Object) search(args = {})
53 54 55 56 57 |
# File 'lib/ad-ldap/adapter.rb', line 53 def search(args = {}) results = super(args.dup) self.check_operation results end |