method

group

v1_9_3_125 - Show latest stable - Class: Etc
group()
public

Provides a convenient Ruby iterator which executes a block for each entry in the /etc/group file.

The code block is passed an Struct::Group struct; see getgrent above for details.

Example:

require 'etc'

Etc.group {|g|
  puts g.name + ": " + g.mem.join(', ')
}