Module: Apollo::Helper::Core
- Defined in:
- lib/apollo_crawler/helper/core_helper.rb
Class Method Summary collapse
-
.get_classes(base = nil) ⇒ Object
Gets a subclasses of specified class with it’s hierarchy.
Class Method Details
.get_classes(base = nil) ⇒ Object
Gets a subclasses of specified class with it’s hierarchy
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/apollo_crawler/helper/core_helper.rb', line 40 def self.get_classes(base=nil) res = [] if(base != nil) res = base.subclasses end res.each do |tmp| # puts tmp.inspect s = self.get_classes(tmp) res << s unless s.empty? end return res.flatten end |