From: Luk Mus Date: 2011-04-05T17:19:34+09:00 Subject: Re: Autoconvert object from one class1 to other class2 in class1 def or how get name of variable in class method? I mean that may be: class String def to_i! # i don't know what is real name of this method (get_name_of_variable) name=self.get_name_of_variable eval("#{name}=#{name}.to_i") end end -- Posted via http://www.ruby-forum.com/.