From: Bryan Zarnett Date: 2001-02-20T02:13:59+09:00 Subject: [ruby-talk:11123] Re: Auto-magically determine your class/method in Ruby I agree, having the calling class as part of caller would be great. Having the line number their is an excellent bonus!!! B. --- Robert Feldt wrote: > On Tue, 20 Feb 2001, Dave Thomas wrote: > > > Bryan Zarnett writes: > > > > > Is their a way to auto-magically determine the > class > > > and method that called an operation in another > class. > > > For example, I have a logger class that would > like to > > > embed in the output line the Class and operation > that > > > logged a message. I don't want to have to pass > this > > > information as an argument if I have to. > > > > This is Ruby. Of _course_ there is... :) > > > > > > > See, I told you. I never should have posted... :-) > > BTW, wouldn't it be nicer if Kernel#caller included > the calling object and > method? First time I encoutered it (the name) that's > what I thought it > did. > > /R > _______________________________________________________ Do You Yahoo!? Get your free @yahoo.ca address at http://mail.yahoo.ca