From: Robert Klemme Date: 2011-05-20T15:28:11+09:00 Subject: Re: Generating Functions in Ruby On Thu, May 19, 2011 at 8:00 PM, 7stud -- wrote: > Robert K. wrote in post #999582: >> >> I am not sure I get your point.  The method was intended to be used as a >> top level method similarly to how he formulated his C macro sample. >> >> $ ruby19 <>  > def SUM_TEMPLATE(name, x, y) >>  >   class <>  > end >>  > SUM_TEMPLATE("f",1,2) >>  > p f >>  > CODE >> 3 >> > > Oh, okay.  But that isn't a class method. That's true. But OP mentioned class methods in just one sentence but all his examples (Ruby and C) were not using class methods. Besides it should not be too difficult to modify the code to generate class methods. I still would like to see more realistic requirements as all speculations about proper ways to solve the problem are moot as long as we do not know the problem. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/