class Attr::Gather::Workflow::Task
@api private
Attributes
depends_on[RW]
name[RW]
Public Class Methods
new(name:, depends_on: [])
click to toggle source
Initialize a new DeepMerge aggregator
@param name [String] name of the task @param depends_on
[Array<Task>] tasks needed before running this task
@api private
# File lib/attr/gather/workflow/task.rb, line 20 def initialize(name:, depends_on: []) @name = name @depends_on = depends_on end
Public Instance Methods
as_json()
click to toggle source
# File lib/attr/gather/workflow/task.rb, line 36 def as_json { name: name, depends_on: depends_on } end
depends_on?(other_task)
click to toggle source
Check if this task depends on a given task
@param other_task [Task] task to check
# 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)
click to toggle source
# 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