module Thor::Base::ClassMethods

def find_and_refresh_task(name) #:nodoc:

:nodoc:

current task hash.
class, just return it, otherwise dup it and add the fresh copy to the
Finds a task with the given name. If the task belongs to the current
def find_and_refresh_task(name) #:nodoc:
  task = if task = tasks[name.to_s]
    task
  elsif task = all_tasks[name.to_s]
    tasks[name.to_s] = task.clone
  else
    raise ArgumentError, "You supplied :for => #{name.inspect}, but the task #{name.inspect} could not be found."
  end
end