Class: Attr::Gather::Workflow::Task Private
- Inherits:
-
Object
- Object
- Attr::Gather::Workflow::Task
- Defined in:
- lib/attr/gather/workflow/task.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #depends_on ⇒ Object private
- #name ⇒ Object private
Instance Method Summary collapse
- #as_json ⇒ Object private
-
#depends_on?(other_task) ⇒ Boolean
private
Check if this task depends on a given task.
- #fullfilled_given_remaining_tasks?(task_list) ⇒ Boolean private
-
#initialize(name:, depends_on: []) ⇒ Task
constructor
private
Initialize a new DeepMerge aggregator.
Constructor Details
#initialize(name:, depends_on: []) ⇒ Task
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize a new DeepMerge aggregator
20 21 22 23 |
# File 'lib/attr/gather/workflow/task.rb', line 20 def initialize(name:, depends_on: []) @name = name @depends_on = depends_on end |
Instance Attribute Details
#depends_on ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/attr/gather/workflow/task.rb', line 12 def depends_on @depends_on end |
#name ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/attr/gather/workflow/task.rb', line 12 def name @name end |
Instance Method Details
#as_json ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 |
# File 'lib/attr/gather/workflow/task.rb', line 36 def as_json { name: name, depends_on: depends_on } end |
#depends_on?(other_task) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Check if this task depends on a given task
28 29 30 |
# File 'lib/attr/gather/workflow/task.rb', line 28 def depends_on?(other_task) depends_on.include?(other_task) end |
#fullfilled_given_remaining_tasks?(task_list) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 |
# File 'lib/attr/gather/workflow/task.rb', line 32 def fullfilled_given_remaining_tasks?(task_list) task_list.none? { |list_task| depends_on?(list_task) } end |