Class: Daytona::PtyResult

Inherits:
Object
  • Object
show all
Defined in:
lib/daytona/common/pty.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exit_code: nil, error: nil) ⇒ PtyResult

Initialize a new PtyResult

Parameters:

  • exit_code (Integer, nil) (defaults to: nil)

    Exit code of the PTY process

  • error (String, nil) (defaults to: nil)

    Error message if the PTY failed



40
41
42
43
# File 'lib/daytona/common/pty.rb', line 40

def initialize(exit_code: nil, error: nil)
  @exit_code = exit_code
  @error = error
end

Instance Attribute Details

#errorString? (readonly)

Returns Error message if the PTY failed or was terminated abnormally. nil if no error occurred.

Returns:

  • (String, nil)

    Error message if the PTY failed or was terminated abnormally. nil if no error occurred.



34
35
36
# File 'lib/daytona/common/pty.rb', line 34

def error
  @error
end

#exit_codeInteger? (readonly)

Returns Exit code of the PTY process (0 for success, non-zero for errors). nil if the process hasn’t exited yet or exit code couldn’t be determined.

Returns:

  • (Integer, nil)

    Exit code of the PTY process (0 for success, non-zero for errors). nil if the process hasn’t exited yet or exit code couldn’t be determined.



30
31
32
# File 'lib/daytona/common/pty.rb', line 30

def exit_code
  @exit_code
end