wannes wrote:
> On 18/10/05, guoxiaotian / gmail.com <guoxiaotian / gmail.com> wrote:
> > what's the purpose of Ruby's Foo#bar notation(what's wrong with
> > Foo.bar)? does this mean class Foo's instance method bar or Foo's class
> > method bar, or both?
>
> They both have different meanings:
>
> Foo#bar : bar is an instance method of the class Foo
> Foo.bar : bar is a class method of the class Foo

You can also use Foo::bar to mean a class method, but that form is
traditionally used to refer to constants rather than methods.