Class: Nucleon::Util::Shell::Result
- Inherits:
-
Object
- Object
- Nucleon::Util::Shell::Result
- Defined in:
- lib/core/util/shell.rb
Overview
Execution result interface
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
- #append_errors(error_str) ⇒ Object
-
#append_output(output_str) ⇒ Object
—.
- #errors ⇒ Object
-
#initialize(command, status = nil) ⇒ Result
constructor
A new instance of Result.
-
#output ⇒ Object
—.
Constructor Details
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
18 19 20 |
# File 'lib/core/util/shell.rb', line 18 def command @command end |
#status ⇒ Object
Returns the value of attribute status.
17 18 19 |
# File 'lib/core/util/shell.rb', line 17 def status @status end |
Instance Method Details
#append_errors(error_str) ⇒ Object
43 44 45 |
# File 'lib/core/util/shell.rb', line 43 def append_errors(error_str) @errors << error_str.rstrip << "\n" end |
#append_output(output_str) ⇒ Object
39 40 41 |
# File 'lib/core/util/shell.rb', line 39 def append_output(output_str) @output << output_str.rstrip << "\n" end |
#errors ⇒ Object
33 34 35 |
# File 'lib/core/util/shell.rb', line 33 def errors @errors.strip end |
#output ⇒ Object
29 30 31 |
# File 'lib/core/util/shell.rb', line 29 def output @output.strip end |