From: Dirk Meijer Date: 2005-12-20T05:24:18+09:00 Subject: Re: shortcut to self.class ? ------=_Part_30977_25197122.1135023846549 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline never really thought about this, but this might be a useful method: def new self.class.new end what are your thoughts? greetings, Dirk. 2005/12/19, Mark J. Reed : > > Without writing my own alias, is there an easy way to get the class of > the current object without calling self.class? I'm trying to call class > methods from within an instance method, and self.class.method_name is > just a little verbose for my taste. I could do type.method_name, but > that's deprecated and not very clear. It would be nice if just class > by itself were understood in context as the method instead of the keyword= , > but since it's not, I'm sort of stuck. Suggestions? > > ------=_Part_30977_25197122.1135023846549--