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

List:       ruby-talk
Subject:    Re: Is this old style Ruby?
From:       Jeremy Tregunna <jtregunna () blurgle ! ca>
Date:       2005-02-15 14:06:37
Message-ID: ad4b0de706ca482010108f2a4f3438f3 () blurgle ! ca
[Download RAW message or body]


On 15-Feb-05, at 8:54 AM, centrepins@gmail.com wrote:

> In Why's guide, I see the line:
>
> File::open( ...etc.
>
> Up 'til now I've always written this as:
>
> File.open( ...etc.
>
> (ie. using a . rather than a ::).  Am I right in thinking the :: for
> accessing class methods is now old-style?

Foo::bar is for accessing "bar" (be it a method or class or whatever) 
in the module "Foo". Foo.bar wants "bar" in class "Foo".

--
J.


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

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