Class: Module

Inherits:
Object
  • Object
show all
Defined in:
lib/cloud_cost_tracker/util/module_instrospection.rb

Overview

Makes the Module heirarchy needs to be inspectable

Instance Method Summary collapse

Instance Method Details

#classesObject



8
9
10
11
12
# File 'lib/cloud_cost_tracker/util/module_instrospection.rb', line 8

def classes
  constants.collect {|const_name| const_get(const_name)}.select do |const|
    const.class == Class
  end
end

#submodulesObject



3
4
5
6
7
# File 'lib/cloud_cost_tracker/util/module_instrospection.rb', line 3

def submodules
  constants.collect {|const_name| const_get(const_name)}.select do |const|
    const.class == Module
  end
end