Class: SpecForge::Step
- Inherits:
-
Object
- Object
- SpecForge::Step
- Defined in:
- lib/spec_forge/step.rb,
lib/spec_forge/step/call.rb,
lib/spec_forge/step/expect.rb,
lib/spec_forge/step/source.rb
Overview
Represents a single executable step within a blueprint
Steps are the fundamental unit of execution in SpecForge. Each step can contain a request, expectations, store operations, callbacks, and debug triggers. Steps are immutable value objects created from normalized YAML data.
Defined Under Namespace
Instance Method Summary collapse
- #calls ⇒ Boolean
-
#initialize(**step) ⇒ Step
constructor
Creates a new Step from normalized YAML data.
Constructor Details
#initialize(**step) ⇒ Step
Creates a new Step from normalized YAML data
Transforms raw step data into structured objects for execution. Converts requests, expectations, hooks, and other attributes into their runtime representations.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/spec_forge/step.rb', line 42 def initialize(**step) step[:calls] = transform_calls(step[:calls]) step[:debug] = step[:debug] == true step[:documentation] ||= nil step[:expects] = transform_expect(step[:expects]) step[:hooks] = transform_hooks(step[:hooks]) step[:included_by] = transform_source(step[:included_by]) step[:request] = transform_request(step[:request]) step[:source] = transform_source(step[:source]) step[:store] = transform_store(step[:store]) step[:tags] ||= nil super(step) end |
Instance Method Details
#calls ⇒ Boolean
31 |
# File 'lib/spec_forge/step.rb', line 31 attr_predicate :calls, :debug, :expects, :hooks, :request, :store |