module Thor::Invocation

def _validate_task(object, task) #:nodoc:

:nodoc:
for it.
Check if the object given is a Thor class object and get a task object
def _validate_task(object, task) #:nodoc:
  klass = object.is_a?(Class) ? object : object.class
  raise "Expected Thor class, got #{klass}" unless klass <= Thor::Base
  task ||= klass.default_task if klass.respond_to?(:default_task)
  task = klass.all_tasks[task.to_s] || Thor::DynamicTask.new(task) if task && !task.is_a?(Thor::Task)
  task
end