Module: OodSupport::Process
- Defined in:
- lib/ood_support/process.rb
Overview
A helper module that describes the current running process
Class Method Summary collapse
-
.group ⇒ Group
Primary group of current process.
-
.groups ⇒ Array<Group>
List of groups current process is in.
-
.groups_changed? ⇒ Boolean
Whether user’s groups changed since running process.
-
.user ⇒ User
Owner of current process.
Class Method Details
.group ⇒ Group
Primary group of current process
12 13 14 |
# File 'lib/ood_support/process.rb', line 12 def self.group Group.new ::Process.gid end |
.groups ⇒ Array<Group>
List of groups current process is in
18 19 20 |
# File 'lib/ood_support/process.rb', line 18 def self.groups ::Process.groups.map {|g| Group.new g} end |
.groups_changed? ⇒ Boolean
Whether user’s groups changed since running process
24 25 26 |
# File 'lib/ood_support/process.rb', line 24 def self.groups_changed? groups.sort != user.groups.sort end |