Class: Procfs2::Proc

Inherits:
ProcModule show all
Defined in:
lib/procfs2/proc.rb

Instance Attribute Summary collapse

Attributes inherited from ProcItem

#_data, #_parent

Instance Method Summary collapse

Methods inherited from ProcModule

provide

Methods inherited from ProcItem

#_filename, #_raw_content, build

Constructor Details

#initialize(root:) ⇒ Proc

Returns a new instance of Proc.



12
13
14
15
16
# File 'lib/procfs2/proc.rb', line 12

def initialize(root:)
  @root = root

  super(parent: nil)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Procfs2::ProcItem

Instance Attribute Details

#rootObject (readonly)

Returns the value of attribute root.



10
11
12
# File 'lib/procfs2/proc.rb', line 10

def root
  @root
end

Instance Method Details

#_pathObject



18
19
20
# File 'lib/procfs2/proc.rb', line 18

def _path
  root.to_s
end