class Etc::Group
Group is a placeholder Struct for user group database on Unix systems.
The struct contains the following members
- name
-
contains the name of the group as a
String. - passwd
-
contains the encrypted password as a
String. An'x'is returned if password access to the group is not available; an empty string is returned if no password is needed to obtain membership of the group. This is system-dependent. - gid
-
contains the groupβs numeric ID as an integer.
- mem
-
is an
Arrayof Strings containing the short login names of the members of the group.
Public Class Methods
(*untyped) → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 687
def self.[]: (*untyped) -> untyped
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 712
def self.each: () -> untyped
Iterates for each entry in the /etc/group file if a block is given.
If no block is given, returns the Enumerator.
The code block is passed a Group struct.
<strong>Example:</strong>
require 'etc' Etc::Group.each {|g| puts g.name + ": " + g.mem.join(', ') } Etc::Group.collect {|g| g.name} Etc::Group.select {|g| !g.mem.empty?}
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 714
def self.inspect: () -> untyped
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 716
def self.keyword_init?: () -> untyped
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 718
def self.members: () -> untyped
(*untyped) → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 720
def self.new: (*untyped) -> untyped
Public Instance Methods
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 722
def gid: () -> Integer
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 724
def gid=: (Integer new_gid) -> void
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 726
def mem: () -> Array[String]
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 728
def mem=: (Array[String] new_mem) -> void
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 730
def name: () -> String
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 732
def name=: (String new_name) -> void
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 734
def passwd: () -> String