Merging a single-user method in a module

I have a module called Setup and want a method alias.

Here's how it looks, but how it doesn't work:

 module Setup def Setup::option_set?(option) #... end alias :option_set? :get_information end 

I assume this is related to Setup:: -prefix. What to do?

+4
source share
1 answer
 module Setup class << self def option_set?(option) #... end alias :get_information :option_set? end end 
+6
source

All Articles