module Bundler::Thor::Base

def register_klass_file(klass) #:nodoc:

:nodoc:

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