From: Matthias Veit Date: 2002-10-15T01:41:47+09:00 Subject: Re: access surrounding class >>>> RK == Ryan King wrote: RK> Matthias, can you describe your problem at a higher level? RK> RK> This seems funky -- maybe there's a better approach? RK> RK> - Ryan King Sorry for my stumbled sentences - I try again. In specializing classes I can refine methods: class A def doit puts "bla" end end class B < A def doit puts "foo" end end A.new.doit B.new.doit will print: bla foo as expected. If I define a class inside A, use functionality from A (which must be static), I can not refine this functionality: class A def self.doit puts "bla" end class Inner def a A.doit end end end class B < A def self.doit puts "foo: end end A::Inner.new.a B::Inner.new.a will print: bla bla If I could express something like .doit that would be defined in A and is refineable. I do not know, if there is such a construct - I think not. But perhaps there is a simple solution to circumvent the absolute path to make this work?? Hope this was more expressive... :) Matthias __________________________________________________ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com