Hi Yohanes,

On Sun, 1 Dec 2002 05:37:04 +0900
Yohanes Santoso <ysantoso / jenny-gnome.dyndns.org> wrote:

> If you're familiar with C, symbol is enum on steroid. Its primary
> usage is as a constant for user program.
> 
> action=:sleep
> if action == :sleep then ... end
> :sleep.to_s ==> "sleep"

I only know ansi C. I can't say I know ansi C++, because it is way out
of control. To implement your code I will write,

action="sleep"
if action=="sleep" then ... end

Still very very confused, is symobol closer to a variable or closer to
the value of the variable? I don't know why :sleep.to_s is "sleep". What
is the relationship between symbol and string??

> HTTP.get ---> get is a class/module method of HTTP
> HTTP#get ---> get is an instance method of class HTTP (get is a method
> of an object of type HTTP)
The above is quite clear, for example
class HTTP
    def HTTP.get1
    end
    def HTTP#get2
    end
    def get3
    end
end

Then, get1 is class method, get2 is instance method. How about get3???

Shannon