Sha256: bdeb4f38941fbf4081f2a1810da7cb6bb5101362ee85b6817fcdadb5ffc0d69a
Contents?: true
Size: 677 Bytes
Versions: 4
Compression:
Stored size: 677 Bytes
Contents
# Class that maintains the User and additional methods for the process. # Helper methods provided use the Process module underneath. # class OSC::Machete::Process def initialize @user = OSC::Machete::User.from_uid(Process.uid) end # The system name of the process user def username @user.name end # use gid not egid def groupname Etc.getgrgid(Process.gid).name end # has the group membership changed since this process started? def group_membership_changed? Process.groups.uniq.sort != @user.groups end # The home directory path of the process user. # # @return [String] The directory path. def home @user.home end end
Version data entries
4 entries across 4 versions & 1 rubygems