Class: RobotLab::To::Tools::SubmitResult
- Inherits:
-
RobotLab::Tool
- Object
- RobotLab::Tool
- RobotLab::To::Tools::SubmitResult
- Defined in:
- lib/robot_lab/to/tools/submit_result.rb
Overview
Tool the robot MUST call as its final action to declare the iteration result.
Create a fresh instance per iteration. After robot.run() returns, read captured_result (nil if the robot never called the tool).
Instance Attribute Summary collapse
-
#captured_result ⇒ Object
readonly
Returns the value of attribute captured_result.
Instance Method Summary collapse
Instance Attribute Details
#captured_result ⇒ Object (readonly)
Returns the value of attribute captured_result.
35 36 37 |
# File 'lib/robot_lab/to/tools/submit_result.rb', line 35 def captured_result @captured_result end |
Instance Method Details
#execute(success:, summary:, key_changes: [], key_learnings: [], should_fully_stop: nil) ⇒ Object
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/robot_lab/to/tools/submit_result.rb', line 37 def execute(success:, summary:, key_changes: [], key_learnings: [], should_fully_stop: nil, **) @captured_result = IterationResult.new( success: success, summary: summary, key_changes: Array(key_changes), key_learnings: Array(key_learnings), should_fully_stop: should_fully_stop ) "Iteration complete. Stop all work now." end |