Class: RobotLab::LearnHookContext
- Inherits:
-
HookContext
- Object
- HookContext
- RobotLab::LearnHookContext
- Defined in:
- lib/robot_lab/hook_context.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#learnings_before ⇒ Object
readonly
Returns the value of attribute learnings_before.
-
#robot ⇒ Object
readonly
Returns the value of attribute robot.
-
#stored ⇒ Object
Returns the value of attribute stored.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Attributes inherited from HookContext
Instance Method Summary collapse
-
#initialize(robot:, text:, learnings_before:) ⇒ LearnHookContext
constructor
A new instance of LearnHookContext.
Methods inherited from HookContext
#ext, #local, #to_h, #with_namespace
Constructor Details
#initialize(robot:, text:, learnings_before:) ⇒ LearnHookContext
Returns a new instance of LearnHookContext.
124 125 126 127 128 129 130 |
# File 'lib/robot_lab/hook_context.rb', line 124 def initialize(robot:, text:, learnings_before:, **) super(event: :learn, **) @robot = robot @text = text @learnings_before = learnings_before.freeze @stored = false end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
122 123 124 |
# File 'lib/robot_lab/hook_context.rb', line 122 def error @error end |
#learnings_before ⇒ Object (readonly)
Returns the value of attribute learnings_before.
121 122 123 |
# File 'lib/robot_lab/hook_context.rb', line 121 def learnings_before @learnings_before end |
#robot ⇒ Object (readonly)
Returns the value of attribute robot.
121 122 123 |
# File 'lib/robot_lab/hook_context.rb', line 121 def robot @robot end |
#stored ⇒ Object
Returns the value of attribute stored.
122 123 124 |
# File 'lib/robot_lab/hook_context.rb', line 122 def stored @stored end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
121 122 123 |
# File 'lib/robot_lab/hook_context.rb', line 121 def text @text end |