From: 7stud -- Date: 2009-02-22T04:48:52+09:00 Subject: Re: How to call a module method dynamically Adrian Klingel wrote: > Ahhh, I'm missing the "self" Ahhh, I guess you don't need this then: module Foo module Bar def mymethod "xyz" end end end str = "Foo::Bar::mymethod" pieces = str.split("::") method_name = pieces.pop module_name = pieces.join("::") mod = eval(module_name) mod.module_eval do module_function method_name.to_sym end puts mod.module_eval(method_name) -- Posted via http://www.ruby-forum.com/.