Method: Bundler::Thor::Util.find_by_namespace
- Defined in:
- lib/bundler/vendor/thor/lib/thor/util.rb
permalink .find_by_namespace(namespace) ⇒ Object
Receives a namespace and search for it in the Bundler::Thor::Base subclasses.
Parameters
- namespace<String>
-
The namespace to search for.
24 25 26 27 |
# File 'lib/bundler/vendor/thor/lib/thor/util.rb', line 24 def find_by_namespace(namespace) namespace = "default#{namespace}" if namespace.empty? || namespace =~ /^:/ Bundler::Thor::Base.subclasses.detect { |klass| klass.namespace == namespace } end |