module Thor::Invocation
def _validate_task(object, task) #: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 <= Thor task = klass.all_tasks[task.to_s] || Thor::Task::Dynamic.new(task) if task && !task.is_a?(Thor::Task) task end