Class: RobotLab::TaskHookContext
- Inherits:
-
HookContext
- Object
- HookContext
- RobotLab::TaskHookContext
- Defined in:
- lib/robot_lab/hook_context.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#error ⇒ Object
Returns the value of attribute error.
-
#memory ⇒ Object
readonly
Returns the value of attribute memory.
-
#network ⇒ Object
readonly
Returns the value of attribute network.
-
#result ⇒ Object
Returns the value of attribute result.
-
#robot ⇒ Object
readonly
Returns the value of attribute robot.
-
#task ⇒ Object
readonly
Returns the value of attribute task.
-
#task_name ⇒ Object
readonly
Returns the value of attribute task_name.
Attributes inherited from HookContext
Instance Method Summary collapse
-
#initialize(task:, network: nil, robot: nil, memory: nil, config: nil, result: nil, error: nil) ⇒ TaskHookContext
constructor
A new instance of TaskHookContext.
Methods inherited from HookContext
#ext, #local, #to_h, #with_namespace
Constructor Details
#initialize(task:, network: nil, robot: nil, memory: nil, config: nil, result: nil, error: nil) ⇒ TaskHookContext
Returns a new instance of TaskHookContext.
107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/robot_lab/hook_context.rb', line 107 def initialize(task:, network: nil, robot: nil, memory: nil, config: nil, result: nil, error: nil, **) super(event: :task, **) @network = network @task = task @task_name = task.name @robot = robot || task.robot @memory = memory @config = config @result = result @error = error end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
104 105 106 |
# File 'lib/robot_lab/hook_context.rb', line 104 def config @config end |
#error ⇒ Object
Returns the value of attribute error.
105 106 107 |
# File 'lib/robot_lab/hook_context.rb', line 105 def error @error end |
#memory ⇒ Object (readonly)
Returns the value of attribute memory.
104 105 106 |
# File 'lib/robot_lab/hook_context.rb', line 104 def memory @memory end |
#network ⇒ Object (readonly)
Returns the value of attribute network.
104 105 106 |
# File 'lib/robot_lab/hook_context.rb', line 104 def network @network end |
#result ⇒ Object
Returns the value of attribute result.
105 106 107 |
# File 'lib/robot_lab/hook_context.rb', line 105 def result @result end |
#robot ⇒ Object (readonly)
Returns the value of attribute robot.
104 105 106 |
# File 'lib/robot_lab/hook_context.rb', line 104 def robot @robot end |
#task ⇒ Object (readonly)
Returns the value of attribute task.
104 105 106 |
# File 'lib/robot_lab/hook_context.rb', line 104 def task @task end |
#task_name ⇒ Object (readonly)
Returns the value of attribute task_name.
104 105 106 |
# File 'lib/robot_lab/hook_context.rb', line 104 def task_name @task_name end |