This method is only available on newer versions.
The first available version (v2_6_3) is shown here.
find_and_refresh_command(name)
protected
Finds a command with the given name. If the command belongs to the current
class, just return it, otherwise dup it and add the fresh copy to the
current command hash.
# File lib/bundler/vendor/thor/lib/thor/base.rb, line 586
def find_and_refresh_command(name) #:nodoc:
if commands[name.to_s]
commands[name.to_s]
elsif command = all_commands[name.to_s] # rubocop:disable AssignmentInCondition
commands[name.to_s] = command.clone
else
raise ArgumentError, "You supplied :for => #{name.inspect}, but the command #{name.inspect} could not be found."
end
end