From: "ara.t.howard" Date: 2008-04-05T08:06:19+09:00 Subject: Re: Using a string as executable code On Apr 4, 2008, at 2:01 PM, Peter Marks wrote: > Thanks for your response. All I mean by 'string function' is a bit of > code that produces a string. Using my example, 'person.name' and > 'person.name.upcase' are different string functions. I don't know if > I'm > using the right terminology, but that's what I mean. If I was to > define > all of these 'string functions' as individual methods, it would be a > lot > of additional hard code and I would still have these method names > locked > into the db. i think you are missing the point: ('a' .. 'z').each do |m| define_method(m){ m } end defines 26 methods - did you read my code? you easily define these compactly in one module and cherry pick them into a specific class with zero db code involved. why don't you spell out your exact problem and we can show you how. cheers. a @ http://codeforpeople.com/ -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama