From: Karl Lopes Date: 2001-04-20T15:11:25+09:00 Subject: [ruby-talk:13913] Accesing attributes/methods from nested blocks Q: How does an nested/inner class access the attributes & methods of an outer class? For ex: def Class1 attr_accessor :attributes_to_read Class2.new{ Class3.new( self ){ #Access attributes_to_read puts @attributes_to_read.to_s #Access method1 method1 } } def method1 "XXX" end end ===== Karl I Lopes __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/