Class: Bolt::Node::Output
- Inherits:
-
Object
- Object
- Bolt::Node::Output
- Defined in:
- lib/bolt/node/output.rb
Instance Attribute Summary collapse
-
#exit_code ⇒ Object
Returns the value of attribute exit_code.
-
#merged_output ⇒ Object
readonly
Returns the value of attribute merged_output.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Instance Method Summary collapse
-
#initialize ⇒ Output
constructor
A new instance of Output.
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ Output
Returns a new instance of Output.
12 13 14 15 16 17 |
# File 'lib/bolt/node/output.rb', line 12 def initialize @stdout = StringIO.new @stderr = StringIO.new @merged_output = StringIO.new @exit_code = 'unknown' end |
Instance Attribute Details
#exit_code ⇒ Object
Returns the value of attribute exit_code.
10 11 12 |
# File 'lib/bolt/node/output.rb', line 10 def exit_code @exit_code end |
#merged_output ⇒ Object (readonly)
Returns the value of attribute merged_output.
9 10 11 |
# File 'lib/bolt/node/output.rb', line 9 def merged_output @merged_output end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
9 10 11 |
# File 'lib/bolt/node/output.rb', line 9 def stderr @stderr end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
9 10 11 |
# File 'lib/bolt/node/output.rb', line 9 def stdout @stdout end |
Instance Method Details
#to_h ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/bolt/node/output.rb', line 19 def to_h { 'stdout' => @stdout.string, 'stderr' => @stderr.string, 'merged_output' => @merged_output.string, 'exit_code' => @exit_code } end |