Class: Once::ActionResult
- Inherits:
-
Struct
- Object
- Struct
- Once::ActionResult
- Defined in:
- lib/buildonce.rb
Instance Attribute Summary collapse
-
#exit_code ⇒ Object
Returns the value of attribute exit_code.
-
#outputs ⇒ Object
Returns the value of attribute outputs.
-
#stderr ⇒ Object
Returns the value of attribute stderr.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
Instance Method Summary collapse
-
#initialize(exit_code:, stdout: nil, stderr: nil, outputs: {}) ⇒ ActionResult
constructor
A new instance of ActionResult.
- #to_h ⇒ Object
Constructor Details
#initialize(exit_code:, stdout: nil, stderr: nil, outputs: {}) ⇒ ActionResult
Returns a new instance of ActionResult.
10 11 12 13 |
# File 'lib/buildonce.rb', line 10 def initialize(exit_code:, stdout: nil, stderr: nil, outputs: {}) outputs ||= {} super(exit_code: exit_code, stdout: stdout, stderr: stderr, outputs: outputs.dup.freeze) end |
Instance Attribute Details
#exit_code ⇒ Object
Returns the value of attribute exit_code
9 10 11 |
# File 'lib/buildonce.rb', line 9 def exit_code @exit_code end |
#outputs ⇒ Object
Returns the value of attribute outputs
9 10 11 |
# File 'lib/buildonce.rb', line 9 def outputs @outputs end |
#stderr ⇒ Object
Returns the value of attribute stderr
9 10 11 |
# File 'lib/buildonce.rb', line 9 def stderr @stderr end |
#stdout ⇒ Object
Returns the value of attribute stdout
9 10 11 |
# File 'lib/buildonce.rb', line 9 def stdout @stdout end |
Instance Method Details
#to_h ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/buildonce.rb', line 15 def to_h { exit_code: exit_code, stdout: stdout, stderr: stderr, outputs: outputs || {}, } end |