ruby on rails 3 - module which generated a bad name for a method -


so have module have used name "log" 1 of internal methods.

the problem is, module has "extend self" line. if call module in script load rails environment, everytime keyword "log" used (i.e rails.application.config.paths.log, or config.paths.log) method inside module getting invoked instead of original file looking for.

is there way mymodule.module_eval , somehow rename method name , route local calls inside module called "log" new method?

otherwise rails , module don't play nice together.

any appreciated!

found answer. privatized bad method inside module using module_eval

nososmartmodule.module_eval   private :log end 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -