Module: Utilities::Submodules

Defined in:
lib/utilities/utilities.rb

Instance Method Summary collapse

Instance Method Details

#submodulesObject

Find every submodules of an object.



4
5
6
# File 'lib/utilities/utilities.rb', line 4

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