class Foo { class Bar { def self name { 'bar } } } Foo Bar name println class Foo Baz { } Foo Baz == Foo::Baz println def Foo Baz name { 'baz } Foo Baz name println