Class: FunkySystem::ProgramOutput
- Inherits:
-
Object
- Object
- FunkySystem::ProgramOutput
- Defined in:
- lib/funkysystem.rb
Instance Attribute Summary collapse
-
#pid ⇒ Object
readonly
Returns the value of attribute pid.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
-
#unused_stdin ⇒ Object
readonly
Returns the value of attribute unused_stdin.
Instance Method Summary collapse
- #error? ⇒ Boolean
-
#initialize(pid, status, stdout, stderr, unused_stdin) ⇒ ProgramOutput
constructor
A new instance of ProgramOutput.
- #success? ⇒ Boolean
Constructor Details
#initialize(pid, status, stdout, stderr, unused_stdin) ⇒ ProgramOutput
Returns a new instance of ProgramOutput.
39 40 41 42 |
# File 'lib/funkysystem.rb', line 39 def initialize(pid, status, stdout, stderr, unused_stdin) @pid, @status, @stdout, @stderr, @unused_stdin = pid, status, stdout, stderr, unused_stdin end |
Instance Attribute Details
#pid ⇒ Object (readonly)
Returns the value of attribute pid.
38 39 40 |
# File 'lib/funkysystem.rb', line 38 def pid @pid end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
38 39 40 |
# File 'lib/funkysystem.rb', line 38 def status @status end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
38 39 40 |
# File 'lib/funkysystem.rb', line 38 def stderr @stderr end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
38 39 40 |
# File 'lib/funkysystem.rb', line 38 def stdout @stdout end |
#unused_stdin ⇒ Object (readonly)
Returns the value of attribute unused_stdin.
38 39 40 |
# File 'lib/funkysystem.rb', line 38 def unused_stdin @unused_stdin end |
Instance Method Details
#error? ⇒ Boolean
43 44 45 |
# File 'lib/funkysystem.rb', line 43 def error? ! @status.success? end |
#success? ⇒ Boolean
46 47 48 |
# File 'lib/funkysystem.rb', line 46 def success? @status.success? end |