Class: SpecForge::Forge::Call
- Defined in:
- lib/spec_forge/forge/actions/call.rb
Overview
Action for the call: step attribute
Executes registered callbacks defined in forge_helper.rb during step processing. Callbacks can receive the current context and optional arguments.
Instance Attribute Summary
Attributes inherited from Action
Instance Method Summary collapse
-
#run(forge) ⇒ void
Executes all callbacks defined in the step's call: attribute.
Methods inherited from Action
Constructor Details
This class inherits a constructor from SpecForge::Forge::Action
Instance Method Details
#run(forge) ⇒ void
This method returns an undefined value.
Executes all callbacks defined in the step's call: attribute
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/spec_forge/forge/actions/call.rb', line 19 def run(forge) context = SpecForge::Forge.context step.calls.each do |call| callback_name = call.callback_name arguments = call.arguments forge.display.action("Call #{callback_name}", symbol: :checkmark, symbol_styles: :yellow) forge.callbacks.run(callback_name, context, arguments) end end |