Class: Ridley::Mixin::ShellOut::Response
- Inherits:
-
Object
- Object
- Ridley::Mixin::ShellOut::Response
- Defined in:
- lib/ridley/mixin/shell_out.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.
16 17 18 19 20 |
# File 'lib/ridley/mixin/shell_out.rb', line 16 def initialize(exitstatus, stdout, stderr) @exitstatus = exitstatus @stdout = stdout @stderr = stderr end |
Instance Attribute Details
#exitstatus ⇒ Fixnum (readonly)
7 8 9 |
# File 'lib/ridley/mixin/shell_out.rb', line 7 def exitstatus @exitstatus end |
#stderr ⇒ String (readonly)
11 12 13 |
# File 'lib/ridley/mixin/shell_out.rb', line 11 def stderr @stderr end |
#stdout ⇒ String (readonly)
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?
26 27 28 |
# File 'lib/ridley/mixin/shell_out.rb', line 26 def error? !success? end |
#success? ⇒ Boolean
22 23 24 |
# File 'lib/ridley/mixin/shell_out.rb', line 22 def success? exitstatus == 0 end |