From: Pokkai Dokkai Date: 2008-02-01T23:17:05+09:00 Subject: Re: how to get the name of parent object inside child object Raffaele Tesi wrote: > i don't know exactly what you mean, but... > Given object x try: > > puts x.class.superclass class Cycle @brand="something" def initialize end end class Wheel @brand def option Cycle.new end end > w=Wheel.new > @brand --->nil > w.option > @brand --->"something" i need a requirement like above one example. should not passing any arguments to child object(w.option) global variable is not allowed. -- Posted via http://www.ruby-forum.com/.