Class: ActiveDirectory::Group

Inherits:
Base
  • Object
show all
Defined in:
lib/active_directory/group.rb

Overview

Represents a Group object within an Active Directory instance.

Constant Summary collapse

ATTRIBUTES =

Attributes that we wish to pull from Active Directory for any Group that can be located within the directory.

["distinguishedName",    # DN of Group
"name",                 # Group Name
"member",               # DN References to Members
"description"]

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

close, connect, connection, find, logger, reconnect

Constructor Details

#initialize(identifier) ⇒ Group

Attempts to load a Group by a Distinguished Name (DN).



56
57
58
59
60
61
62
# File 'lib/active_directory/group.rb', line 56

def initialize(identifier)

  identifier = identifier.delete("\\")

  load_by_dn(identifier)

end

Instance Attribute Details

#descriptionObject

Description



36
37
38
# File 'lib/active_directory/group.rb', line 36

def description
  @description
end

#dnObject

Distinguished Name (DN)



33
34
35
# File 'lib/active_directory/group.rb', line 33

def dn
  @dn
end

#membersObject (readonly)

Proxy for loading and returning the members of this group.



42
43
44
# File 'lib/active_directory/group.rb', line 42

def members
  @members
end

#nameObject

Common Name (CN)



39
40
41
# File 'lib/active_directory/group.rb', line 39

def name
  @name
end