Class: Buff::ShellOut::Response
- Inherits:
-
Object
- Object
- Buff::ShellOut::Response
- Defined in:
- lib/buff/shell_out/response.rb
Instance Attribute Summary collapse
- #exitstatus ⇒ Fixnum readonly
- #stderr ⇒ String readonly
- #stdout ⇒ String readonly
Instance Method Summary collapse
- #error? ⇒ Boolean (also: #failure?)
-
#initialize(exitstatus, stdout, stderr) ⇒ Response
constructor
A new instance of Response.
- #success? ⇒ Boolean
Constructor Details
#initialize(exitstatus, stdout, stderr) ⇒ Response
Returns a new instance of Response.
14 15 16 17 18 |
# File 'lib/buff/shell_out/response.rb', line 14 def initialize(exitstatus, stdout, stderr) @exitstatus = exitstatus @stdout = stdout @stderr = stderr end |
Instance Attribute Details
#exitstatus ⇒ Fixnum (readonly)
5 6 7 |
# File 'lib/buff/shell_out/response.rb', line 5 def exitstatus @exitstatus end |
#stderr ⇒ String (readonly)
9 10 11 |
# File 'lib/buff/shell_out/response.rb', line 9 def stderr @stderr end |
#stdout ⇒ String (readonly)
7 8 9 |
# File 'lib/buff/shell_out/response.rb', line 7 def stdout @stdout end |
Instance Method Details
#error? ⇒ Boolean Also known as: failure?
24 25 26 |
# File 'lib/buff/shell_out/response.rb', line 24 def error? !success? end |
#success? ⇒ Boolean
20 21 22 |
# File 'lib/buff/shell_out/response.rb', line 20 def success? exitstatus == 0 end |