Class: Module
- Inherits:
-
Object
- Object
- Module
- Defined in:
- lib/bewildr/ext/extensions.rb
Overview
adds the submodules method to modules - returns a list of submodules in the module’s namespace
Instance Method Summary collapse
-
#submodules ⇒ Object
:nodoc: all.
Instance Method Details
#submodules ⇒ Object
:nodoc: all
7 8 9 |
# File 'lib/bewildr/ext/extensions.rb', line 7 def submodules constants.collect {|const_name| const_get(const_name)}.select {|const| const.class == Module} end |