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.1.3/stdlib/etc/0/etc.rbs, line 687
def self.[]: (*untyped) -> untyped
() { (::Etc::Group) → void } → singleton(::Etc::Group)
() → ::Enumerator[::Etc::Group]
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.3/stdlib/etc/0/etc.rbs, line 712
def self.each: () { (::Etc::Group) -> void } -> singleton(::Etc::Group)
| () -> ::Enumerator[::Etc::Group]
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.1.3/stdlib/etc/0/etc.rbs, line 715
def self.inspect: () -> untyped
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.3/stdlib/etc/0/etc.rbs, line 717
def self.keyword_init?: () -> untyped
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.3/stdlib/etc/0/etc.rbs, line 719
def self.members: () -> untyped
(*untyped) → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.3/stdlib/etc/0/etc.rbs, line 721
def self.new: (*untyped) -> untyped
Public Instance Methods
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.3/stdlib/etc/0/etc.rbs, line 723
def gid: () -> Integer
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.3/stdlib/etc/0/etc.rbs, line 725
def gid=: (Integer new_gid) -> void
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.3/stdlib/etc/0/etc.rbs, line 727
def mem: () -> Array[String]
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.3/stdlib/etc/0/etc.rbs, line 729
def mem=: (Array[String] new_mem) -> void
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.3/stdlib/etc/0/etc.rbs, line 731
def name: () -> String
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.3/stdlib/etc/0/etc.rbs, line 733
def name=: (String new_name) -> void
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.3/stdlib/etc/0/etc.rbs, line 735
def passwd: () -> String