Class: Procfs2::ProcPid
- Inherits:
-
ProcModule
- Object
- ProcItem
- ProcModule
- Procfs2::ProcPid
- Defined in:
- lib/procfs2/proc_pid.rb
Constant Summary collapse
- LABEL =
:pid
Instance Attribute Summary collapse
-
#pid ⇒ Object
readonly
Returns the value of attribute pid.
Attributes inherited from ProcItem
Class Method Summary collapse
Instance Method Summary collapse
- #_filename ⇒ Object
-
#initialize(pid:, parent:) ⇒ ProcPid
constructor
A new instance of ProcPid.
Methods inherited from ProcModule
Methods inherited from ProcItem
Constructor Details
#initialize(pid:, parent:) ⇒ ProcPid
Returns a new instance of ProcPid.
12 13 14 15 |
# File 'lib/procfs2/proc_pid.rb', line 12 def initialize(pid:, parent:) @pid = pid super(parent: parent) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Procfs2::ProcItem
Instance Attribute Details
#pid ⇒ Object (readonly)
Returns the value of attribute pid.
10 11 12 |
# File 'lib/procfs2/proc_pid.rb', line 10 def pid @pid end |
Class Method Details
.build(pid, parent:) ⇒ Object
24 25 26 |
# File 'lib/procfs2/proc_pid.rb', line 24 def build(pid, parent:) new(pid: pid, parent: parent) end |
Instance Method Details
#_filename ⇒ Object
17 18 19 |
# File 'lib/procfs2/proc_pid.rb', line 17 def _filename pid.to_s end |