def set_alternative_tasks(task, ancestor = nil)
      (ancestor || task).options[:is].each do |task_name|
        if @permissions.key? task_name
          (@tasks[task_name].options[:alternatives] ||= []) << task.name
        else
          set_alternative_tasks(task, @tasks[task_name])
        end
      end
    end
def set_alternative_tasks(task, ancestor = nil)
      (ancestor || task).options[:is].each do |task_name|
        if @permissions.key? task_name
          (@tasks[task_name].options[:alternatives] ||= []) << task.name
        else
          set_alternative_tasks(task, @tasks[task_name])
        end
      end
    end
Set the alternatives of the task.
 Alternatives are the nearest ancestors, which are used in permission definitions.

 @param [Task] task The task for which the alternatives are set
 @param [Task] ancestor The ancestor to process. This is the recursive parameter