From: "Jan E." Date: 2012-04-13T17:17:18+09:00 Subject: Re: How to read a file and execute its code which relates to the current class Hi, I'm not quite sure what you mean. Do you want to use the code in the file to define the methods (like you copied and pasted it into this exact position)? If so, you can use the "instance_eval" method: def job_load instance_eval File.read 'code.txt' end However, this isn't a very good idea. -- Posted via http://www.ruby-forum.com/.