module Thor::Invocation::ClassMethods

def prepare_for_invocation(key, name) #:nodoc:

:nodoc:
available only in class methods invocations (i.e. in Thor::Group).
class and task for it. The key is an optional parameter which is
This method is responsible for receiving a name and find the proper
def prepare_for_invocation(key, name) #:nodoc:
  case name
    when Symbol, String
      Thor::Util.find_class_and_task_by_namespace(name.to_s, !key)
    else
      name
  end
end