From: Julian Leviston Date: 2009-02-06T13:31:27+09:00 Subject: Re: Method Precedence Yeah that's a much better way to do it than instance_eval! Julian On 06/02/2009, at 3:22 PM, Bertram Scharpf wrote: > Am Freitag, 06. Feb 2009, 12:05:21 +0900 schrieb Daly: >> class Example >> def one >> puts "one" >> def two >> puts "two inside one" >> end >> end >> def two >> puts "two inside Example" >> end >> end >> >> e = Example.new >> e.one >> e.two >> f = Example.new >> f.two > > In case you just want to influence the e object, say > > class Example > def one > puts "one" > def self.two > # ^^^^^ > puts "two inside one" > end > end > end > > Bertram > > > -- > Bertram Scharpf > Stuttgart, Deutschland/Germany > http://www.bertram-scharpf.de >