Class: Sys::Admin::Group

Inherits:
Object
  • Object
show all
Defined in:
lib/sys/admin/common.rb,
lib/windows/sys/admin.rb

Overview

The Group class encapsulates the information typically found within an /etc/group entry.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ Group

Creates and returns a new Group object. This class encapsulates the information for a group account, whether it be global or local.

Yields self if a block is given.

Yields:

  • (_self)

Yield Parameters:



130
131
132
# File 'lib/sys/admin/common.rb', line 130

def initialize
  yield self if block_given?
end

Instance Attribute Details

#captionObject

Short description of the object.



923
924
925
# File 'lib/windows/sys/admin.rb', line 923

def caption
  @caption
end

#descriptionObject

Description of the group.



926
927
928
# File 'lib/windows/sys/admin.rb', line 926

def description
  @description
end

#domainObject

Name of the Windows domain to which the group account belongs.



929
930
931
# File 'lib/windows/sys/admin.rb', line 929

def domain
  @domain
end

#gidObject

The group ID.



117
118
119
# File 'lib/sys/admin/common.rb', line 117

def gid
  @gid
end

#install_dateObject

Date the group was added.



932
933
934
# File 'lib/windows/sys/admin.rb', line 932

def install_date
  @install_date
end

#local=(value) ⇒ Object (writeonly)

Sets whether or not the group is local (as opposed to global).



947
948
949
# File 'lib/windows/sys/admin.rb', line 947

def local=(value)
  @local = value
end

#membersObject

An array of members for that group. May contain SID’s.



120
121
122
# File 'lib/sys/admin/common.rb', line 120

def members
  @members
end

#nameObject

Name of the Windows group account on the Group#domain specified.



114
115
116
# File 'lib/sys/admin/common.rb', line 114

def name
  @name
end

#passwdObject

The group password, if any.



123
124
125
# File 'lib/sys/admin/common.rb', line 123

def passwd
  @passwd
end

#sidObject

Security identifier for this group.



938
939
940
# File 'lib/windows/sys/admin.rb', line 938

def sid
  @sid
end

#sid_typeObject

Returns the type of SID (Security Identifier) as a stringified value.



969
970
971
# File 'lib/windows/sys/admin.rb', line 969

def sid_type
  @sid_type
end

#statusObject

Current status for the group, such as “ok”, “error”, etc.



941
942
943
# File 'lib/windows/sys/admin.rb', line 941

def status
  @status
end

Instance Method Details

#local?Boolean

Returns whether or not the group is a local group.

Returns:

  • (Boolean)


963
964
965
# File 'lib/windows/sys/admin.rb', line 963

def local?
  @local
end