Class: Xshellz::CommandResult

Inherits:
Struct
  • Object
show all
Defined in:
lib/xshellz/models.rb

Overview

The outcome of a single Sandbox#run invocation.

A non-zero exit_code does NOT raise - it is data, exactly like a local subprocess call.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#exit_codeObject

Returns the value of attribute exit_code

Returns:

  • (Object)

    the current value of exit_code



8
9
10
# File 'lib/xshellz/models.rb', line 8

def exit_code
  @exit_code
end

#stderrObject

Returns the value of attribute stderr

Returns:

  • (Object)

    the current value of stderr



8
9
10
# File 'lib/xshellz/models.rb', line 8

def stderr
  @stderr
end

#stdoutObject

Returns the value of attribute stdout

Returns:

  • (Object)

    the current value of stdout



8
9
10
# File 'lib/xshellz/models.rb', line 8

def stdout
  @stdout
end

Instance Method Details

#ok?Boolean

True when the command exited with status 0.

Returns:

  • (Boolean)


10
11
12
# File 'lib/xshellz/models.rb', line 10

def ok?
  exit_code == 0
end