From: Phrogz Date: 2008-02-01T08:04:57+09:00 Subject: Re: Referring to method in enclosing class On Jan 31, 3:23 pm, Richard Everhart wrote: > Thanks for the reply. > > I wanted to add functionality to the enclosing class via the addition of > the enclosed class with minimal changes to the enclosing class and its > methods. Specifically, the enclosed class is intended to subclass a > threading framework class and, after instantiated, call methods on the > enclosing class. The enclosing class already extends another class. class Foo def yay puts "foo sez yay" end # Creates a Foo::Bar class that is a subclass of Foo class Bar < Foo def yay puts "bar sez yay" super puts "bar iz done" end end end Foo::Bar.new.yay #=> bar sez yay #=> foo sez yay #=> bar iz done