module Thor::Base

def register_klass_file(klass) #:nodoc:

:nodoc:

class and the file on Thor::Base. This is the method responsable for it.
Whenever a class inherits from Thor or Thor::Group, we should track the
def register_klass_file(klass) #:nodoc:
  file = caller[1].match(/(.*):\d+/)[1]
  Thor::Base.subclasses << klass unless Thor::Base.subclasses.include?(klass)
  file_subclasses = Thor::Base.subclass_files[File.expand_path(file)]
  file_subclasses << klass unless file_subclasses.include?(klass)
end