1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
module TestModule module ChildModule def module_method 42 end end class MyClass include ChildModule end end obj = TestModule::MyClass.new p obj puts obj.module_method # Output: 42