Class: Module

Inherits:
Object
  • Object
show all
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

Instance Method Details

#submodulesObject

: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