Class: Appear::Lsof::PaneConnection

Inherits:
Object
  • Object
show all
Defined in:
lib/appear/lsof.rb

Overview

Represents a pane’s connection to a TTY.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pane, connection, process) ⇒ PaneConnection

Returns a new instance of PaneConnection.

Parameters:



65
66
67
68
69
# File 'lib/appear/lsof.rb', line 65

def initialize(pane, connection, process)
  @pane = pane
  @connection = connection
  @process = process
end

Instance Attribute Details

#connectionConnection (readonly)

Returns an LSOF connection.

Returns:



56
57
58
# File 'lib/appear/lsof.rb', line 56

def connection
  @connection
end

#pane#tty (readonly)

Returns a Terminal emulator pane.

Returns:

  • (#tty)

    a Terminal emulator pane.



53
54
55
# File 'lib/appear/lsof.rb', line 53

def pane
  @pane
end

#processAppear::Processes::ProcessInfo (readonly)

Returns the process.

Returns:



59
60
61
# File 'lib/appear/lsof.rb', line 59

def process
  @process
end

Instance Method Details

#pidFixnum

Returns pid of the process making the connection.

Returns:

  • (Fixnum)

    pid of the process making the connection



77
78
79
# File 'lib/appear/lsof.rb', line 77

def pid
  connection.pid
end

#ttyString

Returns the TTY this connection is to.

Returns:

  • (String)

    the TTY this connection is to



72
73
74
# File 'lib/appear/lsof.rb', line 72

def tty
  connection.file_name
end