[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Shortcut for nested modules (RESOLVED

John Ky

10/10/2006 12:24:00 AM

Awesome,

thanks

-John

> It's the presence of D in the method name that's the problem; any of
> these will work:
>
> module A::B::C::D
> def self.f
> puts 'foo'
> end
> end
>
> module A::B::C::D
> def f
> puts 'foo'
> end
> module_function :f
> end
>
> module A::B::C::D
> def f
> puts 'foo'
> end
> extend self
> end