[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: Singleton Class or Module Functions?
From:       Gavin Kistner <gavin () refinery ! com>
Date:       2004-10-21 14:04:48
Message-ID: 27855F07-236A-11D9-BF76-000A959CF5AC () refinery ! com
[Download RAW message or body]

On Oct 20, 2004, at 4:16 PM, trans. (T. Onoma) wrote:
>   module ThisInstance
>     class << self
>       def hello
>         puts "Hello World!"
>       end
>     end
>   end

Thank you for this; I'm just starting my project, and I have 6 
'major-feature' handlers which are all Singleton classes -- namespace 
and functional-separation wrappers for a bunch of methods. The above 
smells cleaner to me.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic