Bundler::Thor::Util.find_class_and_command_by_namespace

Parsed documentation:
View on GitHub
Receives a namespace and tries to retrieve a Bundler::Thor or Bundler::Thor::Group class
from it. It first searches for a class using the all the given namespace,
if it's not found, removes the highest entry and searches for the class
again. If found, returns the highest entry as the class name.

==== Examples

  class Foo::Bar < Bundler::Thor
    def baz
    end
  end

  class Baz::Foo < Bundler::Thor::Group
  end

  Bundler::Thor::Util.namespace_to_thor_class("foo:bar")     #=> Foo::Bar, nil # will invoke default command
  Bundler::Thor::Util.namespace_to_thor_class("baz:foo")     #=> Baz::Foo, nil
  Bundler::Thor::Util.namespace_to_thor_class("foo:bar:baz") #=> Foo::Bar, "baz"

==== Parameters
namespace<String>
Suggestions:
Please help! Open an issue on GitHub if this assessment is incorrect.