Method: String#root_module
- Defined in:
- lib/chemlab/core_ext/string/root_module.rb
#root_module ⇒ Module
Find the root module (parent module) of a class or module
10 11 12 |
# File 'lib/chemlab/core_ext/string/root_module.rb', line 10 def root_module Object.const_get(split('::').first) end |