class Thor::Task
def run(instance, args=[])
implementation to create custom tasks.
By default, a task invokes a method in the thor class. You can change this
def run(instance, args=[]) raise UndefinedTaskError, "the '#{name}' task of #{instance.class} is private" unless public_method?(instance) instance.send(name, *args) rescue ArgumentError => e parse_argument_error(instance, e, caller) rescue NoMethodError => e parse_no_method_error(instance, e) end