Class: Sys::Admin::Group
- Inherits:
-
Object
- Object
- Sys::Admin::Group
- Defined in:
- lib/sys/admin/common.rb
Overview
The Group class encapsulates information found in /etc/group.
Instance Attribute Summary collapse
-
#gid ⇒ Object
The group’s group ID.
-
#members ⇒ Object
An array of members associated with the group.
-
#name ⇒ Object
The name of the group.
-
#passwd ⇒ Object
The group password, if any.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ Group
constructor
Creates and returns a Group object, which encapsulates the information typically found within an /etc/group entry, i.e.
Constructor Details
#initialize {|_self| ... } ⇒ Group
Creates and returns a Group object, which encapsulates the information typically found within an /etc/group entry, i.e. a struct group.
If a block is provided, yields the object back to the block.
132 133 134 |
# File 'lib/sys/admin/common.rb', line 132 def initialize yield self if block_given? end |
Instance Attribute Details
#gid ⇒ Object
The group’s group ID.
119 120 121 |
# File 'lib/sys/admin/common.rb', line 119 def gid @gid end |
#members ⇒ Object
An array of members associated with the group.
122 123 124 |
# File 'lib/sys/admin/common.rb', line 122 def members @members end |
#name ⇒ Object
The name of the group.
116 117 118 |
# File 'lib/sys/admin/common.rb', line 116 def name @name end |
#passwd ⇒ Object
The group password, if any.
125 126 127 |
# File 'lib/sys/admin/common.rb', line 125 def passwd @passwd end |