def task(options, &block)
      name, params = *options

      raise "Couldn't create task without a name" if name.nil?
      raise "Couldn't create task without a block" unless block_given?

      task = Task.new(name, params)
      task.instance_eval(&block)

      @dag.add_vertex(name: name, task: task)
    end
def task(options, &block)
      name, params = *options

      raise "Couldn't create task without a name" if name.nil?
      raise "Couldn't create task without a block" unless block_given?

      task = Task.new(name, params)
      task.instance_eval(&block)

      @dag.add_vertex(name: name, task: task)
    end
Tasks and dependencies