Module: AD

Defined in:
lib/ad.rb,
lib/ad/version.rb,
lib/ad/record_finder.rb,
lib/ad/authentication.rb,
lib/ad/connection_factory.rb

Defined Under Namespace

Modules: ConnectionFactory Classes: Authentication, RecordFinder

Constant Summary collapse

CONFIG_ATTRS =
[:host, :port, :service_user_dn, :service_user_password, :base_dn, :unique_id_attr, :instrumentation_service].freeze
DEFAULT_UNIQUE_ID_ATTR =
"samaccountname"
DEFAULT_HOST =
"127.0.0.1"
DEFAULT_PORT =
389
VERSION =
"1.1.1"

Class Method Summary collapse

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (AD)

    the object that the method was called on



23
24
25
# File 'lib/ad.rb', line 23

def configure
  yield self
end

.reset!Object



27
28
29
30
31
32
33
34
35
# File 'lib/ad.rb', line 27

def reset!
  CONFIG_ATTRS.each do |attr|
    send("#{attr}=", nil)
  end
  self.host = DEFAULT_HOST
  self.port = DEFAULT_PORT
  self.unique_id_attr = DEFAULT_UNIQUE_ID_ATTR
  true
end