Class: Sys::Admin::Group
- Inherits:
-
Object
- Object
- Sys::Admin::Group
- 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
-
#caption ⇒ Object
Short description of the object.
-
#description ⇒ Object
Description of the group.
-
#domain ⇒ Object
Name of the Windows domain to which the group account belongs.
-
#gid ⇒ Object
The group ID.
-
#install_date ⇒ Object
Date the group was added.
-
#local ⇒ Object
writeonly
Sets whether or not the group is local (as opposed to global).
-
#members ⇒ Object
An array of members for that group.
-
#name ⇒ Object
Name of the Windows group account on the Group#domain specified.
-
#passwd ⇒ Object
The group password, if any.
-
#sid ⇒ Object
Security identifier for this group.
-
#sid_type ⇒ Object
Returns the type of SID (Security Identifier) as a stringified value.
-
#status ⇒ Object
Current status for the group, such as “ok”, “error”, etc.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ Group
constructor
Creates and returns a new Group object.
-
#local? ⇒ Boolean
Returns whether or not the group is a local group.
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.
130 131 132 |
# File 'lib/sys/admin/common.rb', line 130 def initialize yield self if block_given? end |
Instance Attribute Details
#caption ⇒ Object
Short description of the object.
923 924 925 |
# File 'lib/windows/sys/admin.rb', line 923 def caption @caption end |
#description ⇒ Object
Description of the group.
926 927 928 |
# File 'lib/windows/sys/admin.rb', line 926 def description @description end |
#domain ⇒ Object
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 |
#gid ⇒ Object
The group ID.
117 118 119 |
# File 'lib/sys/admin/common.rb', line 117 def gid @gid end |
#install_date ⇒ Object
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 |
#members ⇒ Object
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 |
#name ⇒ Object
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 |
#passwd ⇒ Object
The group password, if any.
123 124 125 |
# File 'lib/sys/admin/common.rb', line 123 def passwd @passwd end |
#sid ⇒ Object
Security identifier for this group.
938 939 940 |
# File 'lib/windows/sys/admin.rb', line 938 def sid @sid end |
#sid_type ⇒ Object
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 |
#status ⇒ Object
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.
963 964 965 |
# File 'lib/windows/sys/admin.rb', line 963 def local? @local end |