From: Kevin Ballard Date: 2005-10-19T06:31:58+09:00 Subject: Re: class#method notation wannes wrote: > On 18/10/05, 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.