Class: OSC::Machete::Process Deprecated
- Inherits:
-
Object
- Object
- OSC::Machete::Process
- Defined in:
- lib/osc/machete/process.rb
Overview
Deprecated.
Please use OodSupport::Process instead.
Class that maintains the User and additional methods for the process. Helper methods provided use the Process module underneath.
Instance Method Summary collapse
-
#group_membership_changed? ⇒ Boolean
has the group membership changed since this process started?.
-
#groupname ⇒ Object
use gid not egid.
-
#home ⇒ String
The home directory path of the process user.
-
#initialize ⇒ Process
constructor
A new instance of Process.
-
#username ⇒ Object
The system name of the process user.
Constructor Details
#initialize ⇒ Process
Returns a new instance of Process.
7 8 9 10 11 |
# File 'lib/osc/machete/process.rb', line 7 def initialize @user = OSC::Machete::User.from_uid(Process.uid) warn "[DEPRECATION] `OSC::Machete::Process` is deprecated. Please use `OodSupport::Process` instead (see ood_support gem)." end |
Instance Method Details
#group_membership_changed? ⇒ Boolean
has the group membership changed since this process started?
24 25 26 |
# File 'lib/osc/machete/process.rb', line 24 def group_membership_changed? Process.groups.uniq.sort != @user.groups end |
#groupname ⇒ Object
use gid not egid
19 20 21 |
# File 'lib/osc/machete/process.rb', line 19 def groupname Etc.getgrgid(Process.gid).name end |
#home ⇒ String
The home directory path of the process user.
31 32 33 |
# File 'lib/osc/machete/process.rb', line 31 def home @user.home end |
#username ⇒ Object
The system name of the process user
14 15 16 |
# File 'lib/osc/machete/process.rb', line 14 def username @user.name end |