From: Mike Hamilton Date: 2007-05-15T01:55:56+09:00 Subject: Re: Ruby Inheritance Question OK - I figured out what you mean! I created a library with a class called Time and added my methods and it all worked great!!! Thanks for the tip, I had no idea you could do that in ruby! Sean T Allen wrote: > Because you are returning the result of '-'. > > If you don't specifically have that return an RTDate, it will return the > result of Time '-' > which is either: > > time - time => float > time - numeric => time > > yours is the second. > > As ruby classes are 'open' and you can add methods to them, inheritance > might not even > be how you want to approach this problem. If RTDate is adding methods > and not storing > additional instance or class data, you should just be adding yesterday > and whatever else > as part of the Time class. -- Posted via http://www.ruby-forum.com/.