Class: SidekiqWorkflows::RootNode
- Inherits:
-
Object
- Object
- SidekiqWorkflows::RootNode
- Includes:
- Node
- Defined in:
- lib/sidekiq_workflows/root_node.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#on_partial_complete ⇒ Object
Returns the value of attribute on_partial_complete.
-
#workflow_uuid ⇒ Object
Returns the value of attribute workflow_uuid.
Instance Method Summary collapse
-
#initialize(workflow_uuid: nil, on_partial_complete: nil) ⇒ RootNode
constructor
A new instance of RootNode.
- #to_h ⇒ Object
Methods included from Node
#add_group, #all_nodes, #serialize
Constructor Details
#initialize(workflow_uuid: nil, on_partial_complete: nil) ⇒ RootNode
Returns a new instance of RootNode.
10 11 12 13 14 |
# File 'lib/sidekiq_workflows/root_node.rb', line 10 def initialize(workflow_uuid: nil, on_partial_complete: nil) @workflow_uuid = workflow_uuid @on_partial_complete = on_partial_complete @children = [] end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
8 9 10 |
# File 'lib/sidekiq_workflows/root_node.rb', line 8 def children @children end |
#on_partial_complete ⇒ Object
Returns the value of attribute on_partial_complete.
7 8 9 |
# File 'lib/sidekiq_workflows/root_node.rb', line 7 def on_partial_complete @on_partial_complete end |
#workflow_uuid ⇒ Object
Returns the value of attribute workflow_uuid.
7 8 9 |
# File 'lib/sidekiq_workflows/root_node.rb', line 7 def workflow_uuid @workflow_uuid end |
Instance Method Details
#to_h ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/sidekiq_workflows/root_node.rb', line 16 def to_h { workflow_uuid: workflow_uuid, on_partial_complete: on_partial_complete, children: @children.map(&:to_h) } end |