module ChoresKit::EmbeddedTask

Public Instance Methods

name() click to toggle source
# File lib/chores_kit/chore/embedded_task.rb, line 3
def name
  task.name
end
run() click to toggle source
# File lib/chores_kit/chore/embedded_task.rb, line 7
def run
  puts "Running task #{name}"
  task.run

  return unless successors

  Thread.abort_on_exception = true
  threads = []

  threads << Thread.new do
    successors.map(&:run)
  end

  threads.map(&:join)
end

Private Instance Methods

task() click to toggle source
# File lib/chores_kit/chore/embedded_task.rb, line 25
def task
  self[:task]
end