From: Toby Rodwell Date: 2007-10-05T23:36:00+09:00 Subject: Refering to an object's 'parent' I'd like to check an object's "parent" to see if it has a certain method, so for example, given ... class House(type) attr_accessor :rooms, :type_of_house @rooms = [] ... def type_of_house type end end class Room ... end my_room = Room.new my_house = House.new my_house.rooms.push(my_room) ... then is it somehow possible to ask ... my_room..respond_to?(type_of_house) ? (I know 'House' is not really the parent of 'Room', and so I suspect the answer is "no", but it can't hurt to ask. Thanks. -- Posted via http://www.ruby-forum.com/.