Class: Pfab::CommandResult

Inherits:
Struct
  • Object
show all
Defined in:
lib/pfab/cli.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#exit_status_codeObject

Returns the value of attribute exit_status_code

Returns:

  • (Object)

    the current value of exit_status_code



492
493
494
# File 'lib/pfab/cli.rb', line 492

def exit_status_code
  @exit_status_code
end

#stderrObject

Returns the value of attribute stderr

Returns:

  • (Object)

    the current value of stderr



492
493
494
# File 'lib/pfab/cli.rb', line 492

def stderr
  @stderr
end

#stdoutObject

Returns the value of attribute stdout

Returns:

  • (Object)

    the current value of stdout



492
493
494
# File 'lib/pfab/cli.rb', line 492

def stdout
  @stdout
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


493
494
495
# File 'lib/pfab/cli.rb', line 493

def success?
  exit_status_code == 0
end

#to_sObject



497
498
499
# File 'lib/pfab/cli.rb', line 497

def to_s
  "status: #{exit_status_code}\n\nstdout: #{stdout}\n\nstderr: #{stderr}\n\n"
end