class System::Group
inherits Reference
¶
Represents a group of users on the host system.
Groups can be retrieved by either group name or their group ID:
require "system/group"
System::Group.find_by name: "staff"
System::Group.find_by id: "0"
Extended modules
Crystal::System::Group
Class methods¶
.find_by(*, name : String)
¶
(*, name : String)
Returns the group associated with the given name.
Raises NotFoundError
if no such group exists.
.find_by(*, id : String)
¶
(*, id : String)
Returns the group associated with the given ID.
Raises NotFoundError
if no such group exists.
.find_by?(*, name : String)
¶
(*, name : String)
Returns the group associated with the given name.
Returns nil
if no such group exists.
.find_by?(*, id : String)
¶
(*, id : String)
Returns the group associated with the given ID.
Returns nil
if no such group exists.
Methods¶
#==(other : self)
¶
(other : self)
Returns true
if this reference is the same as other. Invokes same?
.
#hash(hasher)
¶
(hasher)