Class Index [+]

Quicksearch

ActiveLdap::Connection

Public Class Methods

included(base) click to toggle source
   # File lib/active_ldap/connection.rb, line 3
3:     def self.included(base)
4:       base.extend(ClassMethods)
5:     end

Public Instance Methods

connected?() click to toggle source
     # File lib/active_ldap/connection.rb, line 263
263:     def connected?
264:       connection != self.class.connection
265:     end
connection() click to toggle source
     # File lib/active_ldap/connection.rb, line 248
248:     def connection
249:       conn = @connection
250:       return conn if conn
251: 
252:       have_dn = !@dn.nil?
253:       if !have_dn and attribute_name_resolvable_without_connection?
254:         begin
255:           have_dn = !get_attribute_before_type_cast(dn_attribute)[1].nil?
256:         rescue DistinguishedNameInvalid
257:         end
258:       end
259:       conn = self.class.active_connections[dn] || retrieve_connection if have_dn
260:       conn || self.class.connection
261:     end
connection=(adapter) click to toggle source
     # File lib/active_ldap/connection.rb, line 267
267:     def connection=(adapter)
268:       if adapter.nil? or adapter.is_a?(Adapter::Base)
269:         @connection = adapter
270:       elsif adapter.is_a?(Hash)
271:         config = adapter
272:         @connection = self.class.instantiate_adapter(config)
273:       else
274:         setup_connection(adapter)
275:       end
276:     end
establish_connection(config=nil) click to toggle source
     # File lib/active_ldap/connection.rb, line 234
234:     def establish_connection(config=nil)
235:       message =
236:         _("ActiveLdap::Connection#establish_connection has been deprecated "            "since 1.1.0. "            "Please use ActiveLdap::Connection#setup_connection instead.")
237:       ActiveSupport::Deprecation.warn(message)
238:       setup_connection(config)
239:     end
remove_connection() click to toggle source
     # File lib/active_ldap/connection.rb, line 243
243:     def remove_connection
244:       self.class.remove_connection(dn)
245:       @connection = nil
246:     end
retrieve_connection() click to toggle source
     # File lib/active_ldap/connection.rb, line 278
278:     def retrieve_connection
279:       conn = self.class.active_connections[dn]
280:       return conn if conn
281: 
282:       config = self.class.configuration(dn)
283:       return nil unless config
284: 
285:       conn = self.class.instantiate_adapter(config)
286:       @connection = self.class.active_connections[dn] = conn
287:       conn
288:     end
schema() click to toggle source
     # File lib/active_ldap/connection.rb, line 290
290:     def schema
291:       connection.schema
292:     end
setup_connection(config=nil) click to toggle source
     # File lib/active_ldap/connection.rb, line 225
225:     def setup_connection(config=nil)
226:       config = self.class.ensure_configuration(config)
227:       config = self.class.configuration.merge(config)
228:       config = self.class.merge_configuration(config, self)
229: 
230:       remove_connection
231:       self.class.define_configuration(dn, config)
232:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.