Using module_eval, my code allows me to dynamically create and add new methods to a class based on input parameters. See this post for an example http://stackoverflow.com/questions/2039826/ruby-classeval-and-yield
Now my question is how do I reset the class back to its original methods? Is there a simple method I can use to reset a class back to it's original state? The reason for this is that once new methods are added to the class, they persists and I need to be get rid of them if I create a new object with a different set of methods.
Also I must apologize if this question doesn't quite make sense, I've been up for 24 hours and probably needed to get some rest to think clearly. If this is not clear, I can provide an example. Thanks for your help in advance.