Sha256: 570ab9cf79fa293031816ece44064da4065e58cd702e83c0d51f15cba36399de
Contents?: true
Size: 588 Bytes
Versions: 9
Compression:
Stored size: 588 Bytes
Contents
module Rasti class App class Utils class << self def classes_in(namespace, superclass=nil) [].tap do |classes| namespace.constants.each do |name| constant = namespace.const_get name if constant.class == Module classes_in(constant, superclass).each { |c| classes << c } elsif constant.class == Class && (superclass.nil? || constant.ancestors.include?(superclass)) classes << constant end end end end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems