class Thor::Runner
def display_klasses(with_modules=false, show_internal=false, klasses=Thor::Base.subclasses)
it shows a table with information extracted from the yaml file.
Display information about the given klasses. If with_module is given,
def display_klasses(with_modules=false, show_internal=false, klasses=Thor::Base.subclasses) klasses -= [Thor, Thor::Runner, Thor::Group] unless show_internal raise Error, "No Thor tasks available" if klasses.empty? show_modules if with_modules && !thor_yaml.empty? list = Hash.new { |h,k| h[k] = [] } groups = klasses.select { |k| k.ancestors.include?(Thor::Group) } # Get classes which inherit from Thor (klasses - groups).each { |k| list[k.namespace.split(":").first] += k.printable_tasks(false) } # Get classes which inherit from Thor::Base groups.map! { |k| k.printable_tasks(false).first } list["root"] = groups # Order namespaces with default coming first list = list.sort{ |a,b| a[0].sub(/^default/, '') <=> b[0].sub(/^default/, '') } list.each { |n, tasks| display_tasks(n, tasks) unless tasks.empty? } end