Class: E2B::Services::PtySize
- Inherits:
-
Object
- Object
- E2B::Services::PtySize
- Defined in:
- lib/e2b/services/pty.rb
Overview
Pseudo-terminal size specification.
Instance Attribute Summary collapse
-
#cols ⇒ Integer
readonly
Number of columns.
-
#rows ⇒ Integer
readonly
Number of rows.
Instance Method Summary collapse
-
#initialize(cols: 80, rows: 24) ⇒ PtySize
constructor
A new instance of PtySize.
-
#to_h ⇒ Hash
Convert to a Hash suitable for the Connect RPC request body.
Constructor Details
#initialize(cols: 80, rows: 24) ⇒ PtySize
Returns a new instance of PtySize.
25 26 27 28 |
# File 'lib/e2b/services/pty.rb', line 25 def initialize(cols: 80, rows: 24) @cols = cols @rows = rows end |
Instance Attribute Details
#cols ⇒ Integer (readonly)
Returns Number of columns.
18 19 20 |
# File 'lib/e2b/services/pty.rb', line 18 def cols @cols end |
#rows ⇒ Integer (readonly)
Returns Number of rows.
21 22 23 |
# File 'lib/e2b/services/pty.rb', line 21 def rows @rows end |
Instance Method Details
#to_h ⇒ Hash
Convert to a Hash suitable for the Connect RPC request body.
33 34 35 |
# File 'lib/e2b/services/pty.rb', line 33 def to_h { cols: @cols, rows: @rows } end |