Module: ActionAI::Callbacks::ClassMethods
- Defined in:
- lib/action_ai/callbacks.rb
Instance Method Summary collapse
-
#after_execution(*filters, &blk) ⇒ Object
Defines a callback that will get called right after the prompt’s execution method is finished.
-
#around_execution(*filters, &blk) ⇒ Object
Defines a callback that will get called around the prompts’s execution method.
-
#before_execution(*filters, &blk) ⇒ Object
Defines a callback that will get called right before the prompt is sent to the execution method.
Instance Method Details
#after_execution(*filters, &blk) ⇒ Object
Defines a callback that will get called right after the prompt’s execution method is finished.
21 22 23 |
# File 'lib/action_ai/callbacks.rb', line 21 def after_execution(*filters, &blk) set_callback(:execution, :after, *filters, &blk) end |
#around_execution(*filters, &blk) ⇒ Object
Defines a callback that will get called around the prompts’s execution method.
26 27 28 |
# File 'lib/action_ai/callbacks.rb', line 26 def around_execution(*filters, &blk) set_callback(:execution, :around, *filters, &blk) end |
#before_execution(*filters, &blk) ⇒ Object
Defines a callback that will get called right before the prompt is sent to the execution method.
15 16 17 |
# File 'lib/action_ai/callbacks.rb', line 15 def before_execution(*filters, &blk) set_callback(:execution, :before, *filters, &blk) end |