Module: Kernel::WithModuleConstResolutionExtension
- Defined in:
- lib/utilrb/kernel/with_module.rb
Instance Method Summary collapse
Instance Method Details
#const_missing(const_name) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/utilrb/kernel/with_module.rb', line 18 def const_missing(const_name) if with_module_setup = Thread.current[:__with_module__] if consts = with_module_setup.last consts.each do |mod| if mod.const_defined?(const_name) return mod.const_get(const_name) end end end end super end |