Ruby – What does “class#method” mean in ruby?

ruby

Possible Duplicate:
Why are methods in ruby documentation preceded by a pound sign?

EDIT: Duplicate of Why are methods in ruby documentation preceded by a pound sign?

Hi,

I'm trying to learn Ruby for fun at my spare time with the free Programming Ruby book. It is mostly fairly straight forward but I kept seeing notations like this KaraokeSong#to_s, which is not really explained in the earlier chapters of the book.

I know it meant <class>#<method> but it is something you can use in the code? or just a notation ruby programmers use to specifiy a method like <class>::<method> notation used by C++ programmers?

Best Solution

# = instance method

:: = class method

Per ruby docs:

Use :: for describing class methods, # for describing instance methods, and use . for example code.