El Martes 31 Marzo 2009, I=F1aki Baz Castillo escribi=F3:

> Fantastic! Thanks a lot.

If somebody is interested, I've implemented the above code adding Class=20
methods logging feature:

=2D---------------
module Kernel
=09
	def this_method
		if self.class =3D=3D Class
			"#{self.to_s}.#{caller[0][/`(.*)'/, 1]}"
		else
			"#{self.class}##{caller[0][/`(.*)'/, 1]}"
		end
	end
	private :this_method
=09
end



module MM
	class AA
		def self.class_method
			puts this_method
		end

		def instance_method
			puts this_method
		end
	end
end


MM::AA.class_method
=3D> "MM::AA.class_method"

MM::AA.new.instance_method
=3D> "MM::AA#instance_method"
=2D---------------


Regards.


=2D-=20
I=F1aki Baz Castillo <ibc / aliax.net>