Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: shdwlink1993 on August 13, 2009, 05:34:00 pm

Title: [RESOLVED] Small Aliasing Question
Post by: shdwlink1993 on August 13, 2009, 05:34:00 pm
Unless I'm very mistaken, aliasing a definition in a module isn't quite as easy as the same in a class. Can anyone tell me what you need to do to alias in a module?

Thanks in advance
Title: Re: Small Aliasing Question
Post by: fugibo on August 13, 2009, 09:19:41 pm
Quote from: shdwlink1993 on August 13, 2009, 05:34:00 pm
Unless I'm very mistaken, aliasing a definition in a module isn't quite as easy as the same in a class. Can anyone tell me what you need to do to alias in a module?

Thanks in advance



class << self
  alias :newmethod :oldmethod
end
Title: Re: [RESOLVED] Small Aliasing Question
Post by: shdwlink1993 on August 13, 2009, 11:41:22 pm
OK. Thanks very much, Longfellow. Cheerio.