Class: DurableFlow::ChildWorkflowBuilder
- Inherits:
-
Object
- Object
- DurableFlow::ChildWorkflowBuilder
- Defined in:
- lib/durable_flow/child_workflow_builder.rb
Defined Under Namespace
Classes: Request
Instance Attribute Summary collapse
-
#requests ⇒ Object
readonly
Returns the value of attribute requests.
Instance Method Summary collapse
-
#initialize ⇒ ChildWorkflowBuilder
constructor
A new instance of ChildWorkflowBuilder.
- #workflow(workflow_class, *args, key:, **kwargs) ⇒ Object
Constructor Details
#initialize ⇒ ChildWorkflowBuilder
Returns a new instance of ChildWorkflowBuilder.
13 14 15 |
# File 'lib/durable_flow/child_workflow_builder.rb', line 13 def initialize @requests = [] end |
Instance Attribute Details
#requests ⇒ Object (readonly)
Returns the value of attribute requests.
11 12 13 |
# File 'lib/durable_flow/child_workflow_builder.rb', line 11 def requests @requests end |
Instance Method Details
#workflow(workflow_class, *args, key:, **kwargs) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/durable_flow/child_workflow_builder.rb', line 17 def workflow(workflow_class, *args, key:, **kwargs) requests << Request.new( workflow_key: key.to_s, workflow_class: workflow_class, workflow_args: args, workflow_kwargs: kwargs ) end |