Method: Bundler::Thor::Util.thor_classes_in

Defined in:
lib/bundler/vendor/thor/lib/thor/util.rb

.thor_classes_in(klass) ⇒ Object

Returns the thor classes declared inside the given class.

[View source]

74
75
76
77
78
79
80
# File 'lib/bundler/vendor/thor/lib/thor/util.rb', line 74

def thor_classes_in(klass)
  stringfied_constants = klass.constants.map(&:to_s)
  Bundler::Thor::Base.subclasses.select do |subclass|
    next unless subclass.name
    stringfied_constants.include?(subclass.name.gsub("#{klass.name}::", ""))
  end
end