class Bosh::Exec::Result

Attributes

command[R]

command that generated the result @return [String]

exit_status[R]

exit status of the command @return [Integer]

output[R]

output from the executed command @return [String]

Public Class Methods

new(command, output, exit_status, not_found=false) click to toggle source
# File lib/common/exec/result.rb, line 15
def initialize(command, output, exit_status, not_found=false)
  @command = command
  @output = output
  @exit_status = exit_status
  @not_found = not_found
end

Public Instance Methods

failed?() click to toggle source
# File lib/common/exec/result.rb, line 26
def failed?
  @exit_status != 0 || @not_found
end
not_found?() click to toggle source

true if the command was not found

# File lib/common/exec/result.rb, line 31
def not_found?
  @not_found
end
success?() click to toggle source
# File lib/common/exec/result.rb, line 22
def success?
  @exit_status == 0
end