Class: SpecForge::Forge::Store
- Defined in:
- lib/spec_forge/forge/actions/store.rb
Overview
Action for the store: step attribute
Resolves attribute values and stores them as variables for use by subsequent steps. Can store literal values or extract values from the response using template syntax.
Instance Attribute Summary
Attributes inherited from Action
Instance Method Summary collapse
-
#run(forge) ⇒ void
Stores all configured values in the forge's variables.
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.
Stores all configured values in the forge's variables
20 21 22 23 24 25 26 27 28 |
# File 'lib/spec_forge/forge/actions/store.rb', line 20 def run(forge) step.store.each do |name, value| event = forge.variables.key?(name) ? "Update" : "Store" forge.display.action("#{event} #{name.in_quotes}", symbol: :flag, symbol_styles: :bright_cyan) forge.variables[name] = value.resolved end end |