Class: Sys::Admin::Group

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

Overview

The Group class encapsulates information found in /etc/group.

Instance Attribute Summary collapse

Instance Method Summary collapse

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.

Yields:

  • (_self)

Yield Parameters:



132
133
134
# File 'lib/sys/admin/common.rb', line 132

def initialize
  yield self if block_given?
end

Instance Attribute Details

#gidObject

The group’s group ID.



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

def gid
  @gid
end

#membersObject

An array of members associated with the group.



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

def members
  @members
end

#nameObject

The name of the group.



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

def name
  @name
end

#passwdObject

The group password, if any.



125
126
127
# File 'lib/sys/admin/common.rb', line 125

def passwd
  @passwd
end