Class: Gofer::Response

Inherits:
String
  • Object
show all
Defined in:
lib/gofer/response.rb

Overview

Response container for the various outputs from Gofer::Host#run

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_stdout, _stderr, _output, _exit_status) ⇒ Response

:nodoc:



18
19
20
21
22
23
24
# File 'lib/gofer/response.rb', line 18

def initialize (_stdout, _stderr, _output, _exit_status) # :nodoc:
  super _stdout
  @stdout = _stdout
  @stderr = _stderr
  @output = _output
  @exit_status = _exit_status
end

Instance Attribute Details

#exit_statusObject (readonly)

Exit status of command, only available if :capture_exit_status is used



16
17
18
# File 'lib/gofer/response.rb', line 16

def exit_status
  @exit_status
end

#outputObject (readonly)

Combined STDOUT / STDERR output (also value of this as a String)



13
14
15
# File 'lib/gofer/response.rb', line 13

def output
  @output
end

#stderrObject (readonly)

Captured STDERR output



10
11
12
# File 'lib/gofer/response.rb', line 10

def stderr
  @stderr
end

#stdoutObject (readonly)

Captured STDOUT output



7
8
9
# File 'lib/gofer/response.rb', line 7

def stdout
  @stdout
end