From: "David A. Black" Date: 2004-10-21T09:44:16+09:00 Subject: Re: Singleton Class or Module Functions? Hi -- On Thu, 21 Oct 2004, trans. (T. Onoma) wrote: > I've come across this seemingly indistinct option too many times now. Which is > better? Why choose one over the other? > > module ThisInstance > class << self > def hello > puts "Hello World!" > end > end > end > > ThisInstance.ameth > > or > > class This > include Singleton > def hello > puts "Hello World!" > end > end > > This.instance.ameth (Do you mean 'hello' rather than 'ameth'?) I'm not sure what you mean. What's the connection between them? David -- David A. Black dblack@wobblini.net