From: Patrick Gundlach Date: 2005-08-13T00:06:10+09:00 Subject: eval, attr_* like methods Dear all, I'd like to create methods similar to the attr_* way. I'd like to write class Foo lookup_meth :bar, :baz def some_other_methods .... end end The lookup_meth should define for class Foo methods such as def bar # tricky lookup stuff return value end def bar=(obj) @bar=obj end How would I write such lookup_meth? I've been playing a bit with eval, but I didn't get it quite right. Patrick