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



37
38
39
40
# File 'lib/daytona/common/pty.rb', line 37

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.



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

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.



27
28
29
# File 'lib/daytona/common/pty.rb', line 27

def exit_code
  @exit_code
end