def invoke_task(task,shell)
      unless TASKS.include?(task)
        raise("invalid task: #{task}")
      end

      if @before.has_key?(task)
        @before[task].each { |command| shell.exec(command) }
      end

      send(task,shell) if respond_to?(task)

      if @after.has_key?(task)
        @after[task].each { |command| shell.exec(command) }
      end
    end
def invoke_task(task,shell)
      unless TASKS.include?(task)
        raise("invalid task: #{task}")
      end

      if @before.has_key?(task)
        @before[task].each { |command| shell.exec(command) }
      end

      send(task,shell) if respond_to?(task)

      if @after.has_key?(task)
        @after[task].each { |command| shell.exec(command) }
      end
    end
Invokes a task.

 @param [Symbol] task
   The name of the task to run.

 @param [Shell] shell
   The shell to run the task in.

 @raise [RuntimeError]
   The task name was not known.

 @since 0.5.0