From: han.holl@... (Han Holl) Date: 2004-02-27T18:39:47+09:00 Subject: Re: Callback ts wrote in message > class B > def initialize(k, cb) > class << cb; self end.instance_eval do > define_method('cassette') { k } > end > end > end Hi, I'm still having a problem with this: The above works, but what I'm trying to do is something like class B attr_reader :whatsit def initialize(k, cb) class << cb; self end.instance_eval do define_method('cassette') { 'somehow_return_the_b.objects_whatsit' } end end end The local variable 'k' seems to be in scope inside the instance eval, but instance variables or class B methods aren't. Still, with Pit's solution I got rid of the instance variable, and of the eval. O yes, please forget my question about cb << class; self end and cb.class. It's still early here Cheers, Han Holl