From: Adam Skobi Date: 2008-10-20T06:18:34+09:00 Subject: Re: Proc metaprogramming tricks? >> I'm building a DSL and trying some weird syntax structures. My DSL >> should look like this. >   def dsl(&block) >     C.module_eval(&block) >   end Well yeah, that would work. But I was thinking about something more general. class Root def dsl(&block) instance_eval(&block) end end class C #... end class D #... end dsl { met1 class C1 < C #... end class D1 < D #... end } Can I run part of the Proc in the context of C and part in the context of D i.e. can I somehow split the Proc or convert it to a readable String? The more I think about it, the more absurd the reasoning behind it seems. But since I'm at it, I may as well continue the debate :-) -- Adam Skobi