Class: Procfs2::ProcFdId

Inherits:
Object
  • Object
show all
Defined in:
lib/procfs2/proc_fd_id.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, path:, stat:) ⇒ ProcFdId

Returns a new instance of ProcFdId.



7
8
9
10
11
# File 'lib/procfs2/proc_fd_id.rb', line 7

def initialize(id:, path:, stat:)
  @id = id
  @_path = path
  @_stat = stat
end

Instance Attribute Details

#_pathObject (readonly)

Returns the value of attribute _path.



5
6
7
# File 'lib/procfs2/proc_fd_id.rb', line 5

def _path
  @_path
end

#_statObject (readonly)

Returns the value of attribute _stat.



5
6
7
# File 'lib/procfs2/proc_fd_id.rb', line 5

def _stat
  @_stat
end

#idObject (readonly)

Returns the value of attribute id.



5
6
7
# File 'lib/procfs2/proc_fd_id.rb', line 5

def id
  @id
end

Instance Method Details

#inodeObject



17
18
19
# File 'lib/procfs2/proc_fd_id.rb', line 17

def inode
  _stat.ino
end

#typeObject



13
14
15
# File 'lib/procfs2/proc_fd_id.rb', line 13

def type
  _stat&.ftype
end