From: Daniel Waite Date: 2007-10-26T04:46:57+09:00 Subject: Re: Need help understanding metaclassing Chris Czub wrote: > The method is put into the Creature class and is inaccessible in the > simpleton class. > Try this: > class Creature > > def singleton > class << self > self > end > end > > end > c = Creature.new > cs = c.singleton > > cs.instance_eval do > define_method(:eat) do > puts "You eat." > end > end > > c.eat That's the same code as above. Still doesn't work though. =) -- Posted via http://www.ruby-forum.com/.