Class: Appear::Lsof::PaneConnection
- Inherits:
-
Object
- Object
- Appear::Lsof::PaneConnection
- Defined in:
- lib/appear/lsof.rb
Overview
Represents a pane’s connection to a TTY.
Instance Attribute Summary collapse
-
#connection ⇒ Connection
readonly
An LSOF connection.
-
#pane ⇒ #tty
readonly
A Terminal emulator pane.
-
#process ⇒ Appear::Processes::ProcessInfo
readonly
The process.
Instance Method Summary collapse
-
#initialize(pane, connection, process) ⇒ PaneConnection
constructor
A new instance of PaneConnection.
-
#pid ⇒ Fixnum
Pid of the process making the connection.
-
#tty ⇒ String
The TTY this connection is to.
Constructor Details
#initialize(pane, connection, process) ⇒ PaneConnection
Returns a new instance of PaneConnection.
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
#connection ⇒ Connection (readonly)
Returns an LSOF connection.
56 57 58 |
# File 'lib/appear/lsof.rb', line 56 def connection @connection end |
#pane ⇒ #tty (readonly)
Returns a Terminal emulator pane.
53 54 55 |
# File 'lib/appear/lsof.rb', line 53 def pane @pane end |
#process ⇒ Appear::Processes::ProcessInfo (readonly)
Returns the process.
59 60 61 |
# File 'lib/appear/lsof.rb', line 59 def process @process end |
Instance Method Details
#pid ⇒ Fixnum
Returns pid of the process making the connection.
77 78 79 |
# File 'lib/appear/lsof.rb', line 77 def pid connection.pid end |
#tty ⇒ String
Returns the TTY this connection is to.
72 73 74 |
# File 'lib/appear/lsof.rb', line 72 def tty connection.file_name end |