From: Robert Klemme Date: 2006-07-05T14:23:17+09:00 Subject: Re: can I alias foo --> LongModuleName.foo? 2006/7/5, John Gabriele : > I'd like to save some typing and do: > > --------- code --------- > module LongModuleName > def LongModuleName.foo You can save some typing here by doing def self.foo This is also safer with regard to changes in the module's name. > puts "..." > end > end > > # I don't want to have to keep typing out > # LongModuleName.foo, so let's make a shortcut. > alias foo LongModuleName.foo > > foo > --------- /code --------- > > But Ruby doesn't like that alias line. Any way to get this nice > shortcut to work? def foo() LogModuleName.foo end robert -- Have a look: http://www.flickr.com/photos/fussel-foto/