From: James Byrne Date: 2006-02-23T02:21:16+09:00 Subject: Re: A small refractory problem Ross Bamford wrote: > > And that you want to be able to pass strings, or other DirectoryThings, > as the arguments. So if you have: > > class DirectoryThing > def to_s > self.path > end > end > > You can confidently to_s the argument you're passed (as above), rather > than having to explicitly check what it is - a string will give you > itself, while a DirectoryThing will give you it's path. > > Just a thought... And a very good one at that. I can see that I have much to learn. This approach makes many things very simple. Thank you. -- Posted via http://www.ruby-forum.com/.