Method: Thor::Util.thor_classes_in

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

.thor_classes_in(klass) ⇒ Object

Returns the thor classes declared inside the given class.



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

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