Class: Ridley::Mixin::ShellOut::Response

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/ridley/mixin/shell_out.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(process_status, stdout, stderr) ⇒ Response

Returns a new instance of Response.

Parameters:

  • process_status (Process::Status)
  • stdout (String)
  • stderr (String)


22
23
24
25
26
# File 'lib/ridley/mixin/shell_out.rb', line 22

def initialize(process_status, stdout, stderr)
  @process_status = process_status
  @stdout         = stdout
  @stderr         = stderr
end

Instance Attribute Details

#stderrString (readonly)

Returns:

  • (String)


11
12
13
# File 'lib/ridley/mixin/shell_out.rb', line 11

def stderr
  @stderr
end

#stdoutString (readonly)

Returns:

  • (String)


9
10
11
# File 'lib/ridley/mixin/shell_out.rb', line 9

def stdout
  @stdout
end

Instance Method Details

#error?Boolean Also known as: failure?

Returns:

  • (Boolean)


28
29
30
# File 'lib/ridley/mixin/shell_out.rb', line 28

def error?
  !success?
end